+
    „WÝjœ:  ã                  ó¾  € R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 RHtR R ltR R	 ltR
RRRRRRR/R R lltR R ltRRI/R R lltR R ltR R ltR R ltRRRRRRR RR!R"R#R/R$ R% lltR&R'/R( R) lltRJR* R+ lltR, R- ltR. R/ ltR0 R1 ltR2 R3 ltR4R5R6R/R7 R8 lltR9 R: ltR; R< ltR=R5/R> R? lltR@ RA ltRKRB RC llt RD RE lt!RF RG lt"R# )LuÄ  Shared skeleton for the ``_model_flow_*`` wizards: banner, credentials, model list, picker,
persist, confirmation â€” one copy of each step. Prompt strings and the config keys written (and
their insertion order = config.yaml key order) are behavior; keep them byte-identical.

main_provider_setup / auth / config imports are lazy on purpose: main.py imports the flows (import
cycle) and tests patch ``hermes_cli.config.load_config`` etc. at call time.
)ÚannotationsN)Úurlparse)Ú
line_input)Ú clear_model_endpoint_credentialsc               ó    € V ^8„  d   QhRRRR/# )é   Úfailure_classÚstrÚreturnÚNone© )Úformats   "ÚWC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\model_setup_flows_common.pyÚ__annotate__r      s   € ÷ /ñ / sð /¨tñ /ó    c                ó"   € ^ RI Hp V! V 4       R# )z`Why a flow returns without a pick, for the provider-setup metric (no-op outside a tracked flow).)Únote_provider_setup_failureN)Ú-hermes_cli.observability.shared_metrics_setupr   )r   r   s   & r   Ú_note_setup_failurer      s   € åYá Ö.r   c               ó    € V ^8„  d   QhRRRR/# )r   Úlinesr	   r
   r   r   )r   s   "r   r   r      s   € ÷ ñ �ð ˜ñ r   c                 ó:   € \        RP                  V 4      4       R# )zE``print`` each line (``""`` = blank line); one call per banner block.Ú
N)ÚprintÚjoin)r   s   *r   Ú_sayr      s   € ä	ˆ$�)‰)�EÓ
Ör   ÚsecretFÚrawÚ
cancel_msgz
Cancelled.Ú	on_cancelc               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Úpromptr	   r   Úboolr   r   ú
str | Noner   )r   s   "r   r   r   !   s(   € ÷ ñ �ð  ð °Dð Èjñ r   c               óÆ   € V'       d   ^ RI Hp MV'       d   \        M\        p V! V 4      P	                  4       #   \
        \        3 d    Te   \        T4       Tu # i ; i)zÏOne stripped prompt answer. ``raw`` uses builtin ``input`` (numbered fallbacks),
``secret`` the masked prompt, else ``line_input``. Ctrl-C/EOF prints *cancel_msg*
(``None`` = silent) and returns *on_cancel*.)Úmasked_secret_prompt)Úhermes_cli.secret_promptr%   Úinputr   ÚstripÚKeyboardInterruptÚEOFErrorr   )r!   r   r   r   r   Úfns   &$$$$ r   Ú_askr,   !   sS   € ÷
 ÞGç�UœzˆðÙ�&‹z×ÑÓ!Ð!øÜœxÐ(ô ØÒ!Ü�*ÔØÒðús   ¥; »"A ÁA c               ó    € V ^8„  d   QhRRRR/# )r   Úprovider_idr	   r
   útuple[str, str]r   )r   s   "r   r   r   2   s   € ÷ Bñ B°#ð BÀ?ñ Br   c                ó   € ^ RI Hp V! W4      # )zCResolve an existing wizard credential without changing its storage.)Ú _resolve_api_key_provider_secret)Úhermes_cli.authr1   )r.   Úpconfigr1   s   && r   Ú _existing_api_key_for_model_flowr4   2   s   € å@Ù+¨KÓAÐAr   Úmissing_hintc               ó    € V ^8„  d   QhRRRR/# )r   r.   r	   r
   ztuple[str, str, bool]r   )r   s   "r   r   r   8   s   € ÷ )ñ ) cð )ÐK`ñ )r   c               ó€   € ^ RI Hp \        W4      w  rEV'       g   V F  p\        V4       K  	  V! WWR7      w  rxWGV3# )zÇResolve the stored key, print *missing_hint* lines when none exists, then run
``_prompt_api_key`` (users can replace a stale key in-flow via K/R/C).

Returns ``(existing_key, resolved_key, abort)``.
)Ú_prompt_api_key)r.   Úexisting_source)Úhermes_cli.main_provider_setupr8   r4   r   )	r.   r3   r5   r8   Úexisting_keyr9   ÚlineÚresolvedÚaborts	   &&$      r   Ú_ensure_flow_api_keyr?   8   sA   € õ ?Ü$DÀ[Ó$ZÑ!€LßÛ ˆDÜ�$ŽKñ !á% gÈÔv�O€HØ 5Ð(Ð(r   c               ó   € V ^8„  d   QhRR/# )r   r
   útuple[dict, dict]r   )r   s   "r   r   r   G   s   € ÷ ñ Ð$5ñ r   c                 ó”   € ^ RI Hp  V ! 4       pVP                  R4      p\        V\        4      '       g   V'       d   RV/M/ pW!R&   W3# )zHReturn ``(cfg, cfg["model"])`` with the model section coerced to a dict.)Úload_configÚmodelÚdefault)Úhermes_cli.configrC   ÚgetÚ
isinstanceÚdict)rC   ÚcfgrD   s      r   Ú_load_config_model_sectionrK   G   sD   € å-Ù
‹-€CØ�G‰G�GÓ€EÜ�eœT×"Ò"ß&+�˜EÑ"°ˆØˆG‰Øˆ:Ðr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úselectedr	   Úproviderr
   rA   r   )r   s   "r   r   r   R   s"   € ÷ ñ  #ð °ð Ð9Jñ r   c                óD   € ^ RI Hp V! V 4       \        4       w  r4WR&   W43# )z™Record *selected* as the model choice and open the config model section
with ``provider`` set; callers set endpoint fields then ``_commit_model_config``.)Ú_save_model_choicerN   )r2   rP   rK   )rM   rN   rP   rJ   rD   s   &&   r   Ú_begin_model_configrQ   R   s)   € õ 3Ù�xÔ Ü+Ó-�J€CØ ˆ*ÑØˆ:Ðr   c               ó    € V ^8„  d   QhRRRR/# )r   rJ   rI   r
   r   r   )r   s   "r   r   r   \   s   € ÷ ñ ˜dð  tñ r   c                ó<   € ^ RI Hp ^ RIHp V! V 4       V! 4        R# )z0Persist *cfg* and deactivate any OAuth provider.)Údeactivate_provider)Úsave_configN)r2   rT   rF   rU   )rJ   rT   rU   s   &  r   Ú_commit_model_configrV   \   s   € å3Ý-Ù�ÔÙÖr   Úbase_urlÚapi_modeÚdrop_base_urlÚdrop_api_modeÚclear_credsTÚfinishc               ó8   € V ^8„  d   QhRRRRRRRRRRR	RR
RRR/# )r   rM   r	   rN   rW   r#   rX   rY   r"   rZ   r[   r
   rI   r   )r   s   "r   r   r   d   sI   € ÷ ñ ˜Sð ¨Cð ¸jð Ð[eð Ø"&ðØ?CðØZ^ðà#'ñr   c               ó   € \        W4      w  r‰Ve   W)R&   Ve   W9R&   V'       d   V	P                  RR4       V'       d   \        W•R7       MV'       d   V	P                  RR4       Ve	   V! W‰4       \        V4       V	# )uS  The standard persist step: ``_save_model_choice`` â†’ model section with ``provider``,
``base_url`` then ``api_mode`` (that order is the config.yaml key order) â†’ scrub inline
endpoint credentials (``clear_creds``; ``drop_api_mode`` also pops ``api_mode``) â†’
*finish(cfg, model)* for extra sections â†’ save + deactivate OAuth provider.NrW   rX   )Úclear_api_mode)rQ   Úpopr   rV   )
rM   rN   rW   rX   rY   rZ   r[   r\   rJ   rD   s
   &&$$$$$$  r   Ú_persist_modelra   d   st   € ô % XÓ8�J€CØÒØ$ˆjÑØÒØ$ˆjÑßØ�	‰	�*˜dÔ#ßÜ(¨ÖMß	Ø�	‰	�*˜dÔ#ØÒÙˆsÔÜ˜ÔØ€Lr   Ú	no_changeú
No change.c               ó$   € V ^8„  d   QhRRRRRR/# )r   rN   r	   Údonerb   r   )r   s   "r   r   r   |   s!   € ÷ ñ  cð °ð ÀCñ r   c               ó^   € V '       g   \        V4       R# \        W3/ VB p\        V4       V# )z’``_persist_model`` + confirmation line when *selected*, else the no-change line.
Returns the saved model section (None when nothing was selected).N)r   ra   )rM   rN   re   rb   Ú
persist_kwrD   s   &&&$, r   Ú_finish_modelrh   |   s-   € ÷ ÜˆiÔÙÜ˜8Ñ<°Ñ<€EÜ	ˆ$„KØ€Lr   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   r.   r	   rW   re   rb   r#   r
   r   r   )r   s   "r   r   r   ‡   s1   € ÷ ñ °Cð À3ð Ècð Ø(2ðØFJñr   c                ó~   € ^ RI HpHp V '       g   Ve   \        V4       R# V! V 4       V! W4       \        V4       R# )z§OAuth-provider persist: model choice + ``_update_config_for_provider`` (which owns
the auth-state bookkeeping), then *done*; *no_change* (``None`` = silent) otherwise.)rP   Ú_update_config_for_providerN)r2   rP   rk   r   )rM   r.   rW   re   rb   rP   rk   s   &&&&&  r   Ú_activate_provider_modelrl   ‡   s3   € ÷ PßØÒ Ü�)ÔÙÙ�xÔ Ù Ô6Ü	ˆ$†Kr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rJ   rI   Úkeyr	   r
   r   )r   s   "r   r   r   •   s!   € ÷ ñ ˜dð ¨ð °ñ r   c                ó`   € V P                  V4      p\        V\        4      '       g   / pW V&   V# )zBReturn ``cfg[key]`` as a dict, replacing a missing/non-dict value.)rG   rH   rI   )rJ   rn   Úsections   && r   Ú_ensure_dict_sectionrq   •   s-   € à�g‰g�c‹l€GÜ�gœt×$Ò$ØˆØˆ�HØ€Nr   c               ó   € V ^8„  d   QhRR/# )r   r!   r	   r   )r   s   "r   r   r   ž   s   € ÷ )ñ )¨cñ )r   c                óJ   € ^ RI Hp V '       d
   V! V 3/ VB # \        VRR7      # )zbRadio picker when *model_list* is non-empty, else a free-text ``line_input``
(None on Ctrl-C/EOF).)Ú_prompt_model_selectionN)r   )r2   rt   r,   )Ú
model_listr!   Úkwargsrt   s   &&, r   Ú_pick_model_or_promptrw   ž   s'   € õ 8ßÙ& zÑ<°VÑ<Ð<Ü� 4Ô(Ð(r   c               ó   € V ^8„  d   QhRR/# )r   r
   r/   r   )r   s   "r   r   r   §   s   € ÷ Wñ W /ñ Wr   c           	     ó*  € \        R V  4       R4      pVf   R# \        \        VRR4      ;'       g    R4      p\        \        \        VRR4      ;'       g    R4      4      P                  ;'       g    RpVR8X  d   R	V3# V'       d   R
V 2V3# RV3# )ah  (retry_command, service_host) for a login helper's failure copy, from the ``ProviderConfig``
among its positional args. Nous keeps ``hermes portal``; every other OAuth provider is retried
with ``hermes auth add <provider>`` and named by its own portal host (``hermes login`` no longer
exists). Falls back to ``hermes model`` when no provider config is in play.c              3  óv   "  € T F/  p\        VR 4      '       g   K  \        VR4      '       g   K+  Vx € K1  	  R# 5i)ÚidÚportal_base_urlN)Úhasattr)Ú.0Úas   & r   Ú	<genexpr>Ú'_login_retry_context.<locals>.<genexpr>¬   s'   é € ÐZ™t˜!¤w¨q°$×'7”A¼GÀAÐGX×<Y—A’A›tùs   ‚9›9¯
9Núhermes modelúthe sign-in servicer{   Ú r|   Únouszhermes portalzhermes auth add )r‚   rƒ   )Únextr	   Úgetattrr   Úhostname)Úargsr3   r.   Úhosts   &   r   Ú_login_retry_contextr‹   §   s¡   € ô
 ÑZ™tÓZÐ\`Óa€GØ‚Ø4Ð4Ü”g˜g t¨RÓ0×6Ð6°BÓ7€KÜ”Cœ Ð):¸BÓ?×EÐEÀ2ÓFÓG×PÑP×iÐiÐTi€DØ�fÔØ Ð$Ð$ß0;Ð˜{˜mÐ,ÐRVÐVÐVÀÐRVÐVÐVr   c               ó   € V ^8„  d   QhRR/# )r   r
   r"   r   )r   s   "r   r   r   ¶   s   € ÷ ñ ¨Tñ r   c                ó  € ^ RI Hp \        V4      w  rE V ! V/ VB  R
#   \         d®   pTP                  R9   d   \        R4       M…\        TP                  \        4      '       dW   TP                  P                  4       '       d7   \        RTP                  P                  4        24       \        RT R24       M\        RT R24        Rp?R# Rp?i\         d(   pT! YeTR	7       F  p\        T4       K  	   Rp?R# Rp?ii ; i)a.  Run an OAuth login helper; print plain failure copy (what happened + retry command) and
return False on SystemExit / any exception. The retry command and service host come from the
provider config passed to the helper, so a MiniMax failure never says ``hermes portal`` /
``portal.nousresearch.com``. Helpers that print their own copy raise ``SystemExit(1)`` with no
message, which stays silent; a SystemExit that carries a message (or a non-cancel code from a
helper that printed nothing) gets a one-line explanation so the user is never left with no
output.)Úsign_in_failure_linesNzSign-in was cancelled.zSign-in did not complete: zRun `z` to try again.zSign-in did not complete; run `F)Úservice_hostÚretry_commandT)é‚   Né    )
Úhermes_cli.auth_error_copyrŽ   r‹   Ú
SystemExitÚcoder   rH   r	   r(   Ú	Exception)Úlogin_fnr‰   rv   rŽ   r�   r�   Úexcr<   s   &*,     r   Ú
_run_loginr™   ¶   sÜ   € õ AÜ"6°tÓ"<Ñ€MðÙ�$Ð!˜&Ò!ñ øô ô Ø�8‰8�~Ô%ÜÐ*Õ+Ü˜Ÿ™¤#×&Ò&¨3¯8©8¯>©>×+;Ò+;ÜÐ.¨s¯x©x¯~©~Ó/?Ð.@ÐAÔBÜ�E˜-˜¨Ð8Õ9äÐ3°M°?À/ÐRÔSÝûÜô Ù)¨#ÐXe×fˆDÜ�$ŽKñ gåûðús.   • ŸDªACÂACÃDÃDÃ DÄDÚ
fresh_namer„   Úrecheckc               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Ú	logged_inr"   Únamer	   rš   r
   r   )r   s   "r   r   r   Ò   s)   € ÷ ñ ˜4ð  sð Èsð Ðjnñ r   c               óJ  € V '       g   \        RV R2R4       \        V.VO5!  # \        RV R2R4       \        V R24      pVR8X  d   R# VR	8X  dP   \        R
T;'       g    T R2R4       \        V.VO5RR/ '       g   R# Ve   V! 4       '       g   \        R4       R# R# )uÛ   Login-or-reuse step for OAuth providers. Not logged in â†’ start a login. Logged in â†’
use / reauthenticate (``force_new_login``; *recheck()* must then report logged in) /
cancel. Returns False when the flow must stop.zNot logged into z. Starting login...r„   ú  u    credentials: âœ“z credentials:ÚcancelFÚreauthzStarting a fresh z	 login...Úforce_new_loginTzLogin failed.)r   r™   Ú_prompt_auth_credentials_choicer   )r�   rž   r—   rš   r›   Ú
login_argsÚchoices   &&&$$* r   Ú_oauth_gater§   Ò   s³   € ÷ ÜÐ ˜vÐ%8Ð9¸2Ô>Ü˜(Ð0 ZÓ0Ð0Üˆ2ˆdˆVÐ$Ð	% rÔ*Ü,°¨v°]Ð-CÓD€FØ�ÔÙØ�ÔÜÐ  ×!3Ð!3¨tÐ 4°IÐ>ÀÔCÜ˜(ÐF ZÒFÀ×FÐFÙØÒ¡w§y¢yÜ�/Ô"ÙÙr   c               ó    € V ^8„  d   QhRRRR/# )r   r.   r	   r
   Úlistr   )r   s   "r   r   r   ç   s   € ÷ !ñ ! Cð !°Tñ !r   c                óî  € ^ RI Hp . p\        P                  ! \        4      ;_uu_ 4        ^ RIHp V! V 4      pRRR4       V'       g   . # W9   d   W13MW3w  rVV Uu/ uF  qwP                  4       VbK  	  pp/ p	. VOVO FA  pV	P                  VP                  4       VP                  VP                  4       V4      4       KC  	  \        V	P                  4       4      #   + '       g   i     L­; iu upi )al  Curated ids first (our agentic picks lead, and models.dev lag can't hide new ones), then
models.dev agentic models not yet listed (case-insensitive; models.dev's spelling wins since
it comes from the provider). Live-first providers keep
models.dev order ahead of curated, matching ``_profile_live_catalog``. Empty list when
models.dev has nothing / is unavailable.)Ú_LIVE_FIRST_PICKER_PROVIDERS)Úlist_agentic_modelsN)Ú hermes_cli.models_catalog_staticr«   Ú
contextlibÚsuppressr–   Úagent.models_devr¬   ÚlowerÚ
setdefaultrG   r©   Úvalues)
r.   Úcuratedr«   Úmdev_modelsr¬   ÚprimaryÚ	secondaryÚmÚ	canonicalÚmergeds
   &&        r   Ú_models_dev_mergedr»   ç   sÊ   € õ NØ€KÜ	×	Ò	œY×	'Õ	'Ý8Ù)¨+Ó6ˆ÷ 
(÷ Øˆ	Ø3>Ô3^˜+Ñ/ÐelÐdzÑ€GÙ'2Ó3¡{ !—‘“˜A’¡{€IÐ3Ø€FØ#ˆwÐ#˜Ó#ˆØ×Ñ˜!Ÿ'™'›) Y§]¡]°1·7±7³9¸aÓ%@ÖAñ $ä�—‘“Ó Ð ÷ 
(×	'üò 4s   «CÁC2ÃC/	c               ó   € V ^8„  d   QhRR/# )r   r
   r   r   )r   s   "r   r   r   ü   s   € ÷ kñ k ñ kr   c                óJ   € V '       d   \        R \        V 4       R24       R# R# )z
  Showing u=    curated models â€” use "Enter custom model name" for others.N)r   Úlen)ru   s   &r   Ú_show_curatedr¿   ü   s!   € ßÜ�
œ3˜z›?Ð+Ð+hÐiÖjñ r   Úprovider_namec               ó$   € V ^8„  d   QhRRRRRR/# )r   rW   r	   rÀ   r
   r   r   )r   s   "r   r   r     s#   € ÷ "ñ "¸cð "ÐUXð "Ðbfñ "r   c               ó´  €  ^ RI HpHp ^ RIHpHp T! Y;'       g    RR7       Uu0 uF*  p\        V4      P                  4       P                  4       kK,  	  ppV'       g   R# V! R4      p\        V\        4      '       g   R# VP                  4        EF  w  rš\        V	\        4      '       d4   V	P                  V4      '       d   W—9   g   \        V
\        4      '       g   KQ  V
 Uu. uF3  p\        V\        4      '       d   VP                  R4      R8X  d   K1  VNK5  	  pp\        V4      \        V
4      8w  g   K«  V
 Uu. uF^  p\        V\        4      '       g   K  VP                  R4      R8X  g   K3  VP                  R4      '       g   KL  \        VR,          4      NK`  	  ppV! WœVR7       EK"  	  R# u upi u upi u upi   \          d     R# i ; i)	a	  Drop stale ``model_config`` ("the credential under ``model.api_key``") entries from inactive
custom pools: after an explicit custom-endpoint switch an old pool still carrying that source
points at the previous endpoint and could be selected before the fresh config.)ÚCUSTOM_POOL_PREFIXÚ#custom_provider_pool_key_candidates)Úread_credential_poolÚwrite_credential_poolN)rÀ   ÚsourceÚmodel_configr{   )Úremoved_ids)Úagent.credential_poolrÃ   rÄ   r2   rÅ   rÆ   r	   r(   r±   rH   rI   ÚitemsÚ
startswithr©   rG   r¾   r–   )rW   rÀ   rÃ   rÄ   rÅ   rÆ   rn   Úactive_pool_keysÚpoolsÚpool_keyÚentriesÚeÚretainedrÉ   s   &$            r   Ú/_prune_replaced_custom_model_config_credentialsrÓ     s“  € ðßaßOñ ;¸8×ShÐShÐdhÕiókái�ô �‹H�N‰NÓ×"Ñ"Ö$Ùið 	ð k÷  ÙÙ$ TÓ*ˆÜ˜%¤×&Ò&ÙØ!&§¡§ÑˆHä˜x¬×-Ò-Ø×*Ñ*Ð+=×>Ò>ØÔ/Ü! '¬4×0Ò0ÙÙ#*Ón¡7˜a´:¸aÄ×3FÒ3FÈ1Ï5É5ÐQYË?Ð^lÑKlŸ˜¡7ˆHÐnÜ�8‹}¤ G£Ö,á*1óbÙ*1 QÜ! !¤T×*ô !Ø/0¯u©u°X«À.Ñ/Pô !ØUV×UZÑUZÐ[_×U`ô !”C˜˜$�–L©'ð ð bñ & hÀk×RÐRó "/ùòkùò oùòbøô ô Úðúsp   ‚G �
G §0F9Á
G Á#G ÂAG Ã"G Ã(.F>ÄF>Ä!G Ä>G ÅGÅGÅ7GÆGÆ&G Æ9G ÇGÇGc               ó$   € V ^8„  d   QhRRRRRR/# )r   Útitler	   Úrowsr©   Údefault_idxÚintr   )r   s   "r   r   r   &  s!   € ÷ ñ ˜#ð  Tð ¸ñ r   c                óF   €  ^ RI Hp V! WV4      #   \         d     R# i ; i)zŒ``_curses_prompt_choice`` index, or None when curses is unavailable (piped stdin,
non-TTY) so the caller can fall back to a numbered prompt.)Ú_curses_prompt_choiceN)Úhermes_cli.setuprÚ   r–   )rÕ   rÖ   r×   rÚ   s   &&& r   Ú_curses_choicerÜ   &  s)   € ðÝ:Ù$ U°+Ó>Ð>øÜô Úðús   ‚ ‘ Ÿ c               ó$   € V ^8„  d   QhRRRRRR/# )r   rÕ   r	   rË   r©   r×   rØ   r   )r   s   "r   r   r   0  s!   € ÷ ñ �cð  $ð °Sñ r   c                ó‚   €  ^ RI Hp V! W3RVRR/VB #   \        \        \        \
        P                  3 d     R# i ; i)z�``curses_radiolist`` index (-1 = cancelled), or None when curses is unavailable so the
caller can fall back to a numbered prompt.)Úcurses_radiolistrM   Úcancel_returnsNéÿÿÿÿ)Úhermes_cli.curses_uirß   ÚImportErrorÚNotImplementedErrorÚOSErrorÚ
subprocessÚSubprocessError)rÕ   rË   r×   Úkwrß   s   &&&, r   Ú
_radiolistré   0  sH   € ðÝ9Ù Ñ\°{Ð\ÐSUÐ\ÐY[Ñ\Ð\øÜÔ,¬g´z×7QÑ7QÐRô Úðús   ‚ •%>½>c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   rÕ   r	   rÖ   r©   r×   rØ   r
   r   r   )r   s   "r   r   r   :  s(   € ÷ (ñ (˜3ð ( dð (¸ð (Àñ (r   c           	     ó’   € \        V 4       \        V^4       F+  w  r4V^,
          V8X  d   RMRp\        RV RV RV 24       K-  	  R# )é   u   â†’Ú r    z. N)r   Ú	enumerate)rÕ   rÖ   r×   ÚiÚrowÚmarkers   &&&   r   Ú_print_numberedrò   :  sI   € Ü	ˆ%„LÜ˜D !Ö$‰ˆØ˜q�5 [Ô0‘°cˆÜ��6�(˜!˜A˜3˜b  Ð&Ö'ó %r   c               ó    € V ^8„  d   QhRRRR/# )r   rÕ   r	   r
   r   )r   s   "r   r   r   A  s   € ÷ =ñ =¨3ð =°3ñ =r   c                óÔ   € . ROp\        W^ 4      pVe   V^ 8¼  d   \        4        RV,          # \        W^ 4       \        4        \        RRRRR7      pR	RR
R/P	                  VR4      # )zÑPrompt for reuse / reauthenticate / cancel with the standard radio UI.

Returns one of ``"use"``, ``"reauth"``, ``"cancel"``. Falls back to a
numbered prompt when curses is unavailable (piped stdin, non-TTY).
NÚuser¢   r¡   z  Choice [1/2/3]: TÚ1)r   r   r   Ú2Ú3)zUse existing credentialsz Reauthenticate (new OAuth login)ÚCancel)rõ   r¢   r¡   )rÜ   r   rò   r,   rG   )rÕ   ÚchoicesÚidxr¦   s   &   r   r¤   r¤   A  sm   € ò Y€GÜ
˜¨Ó
+€CØ
‚˜3 !œ8ÜŒØ*¨3Õ/Ð/Ü�E AÔ&Ü	„GÜÐ&¨D¸TÈSÔQ€FØ�˜3 Ð)×-Ñ-¨f°eÓ<Ð<r   )zhttp://zhttps://r   )rc   )r’   )#Ú__doc__Ú
__future__r   r®   ræ   Úurllib.parser   Úhermes_cli.cli_outputr   rF   r   Ú_HTTPr   r   r,   r4   r?   rK   rQ   rV   ra   rh   rl   rq   rw   r‹   r™   r§   r»   r¿   rÓ   rÜ   ré   rò   r¤   r   r   r   Ú<module>r     s  ðñõ #ã Û Ý !å ,Ý >à€õ/õð
¨ð ¸5ð Ð[ið Ø÷õ"Bð)ÀB÷ )õõõðÈ4ð Ðhlð Ø).ðØFKðØaeðà÷ð0È,÷ ÷õõ)õWõð8ÐUWð Ðae÷ õ*!õ*kð
"Ð[]÷ "õJ÷õ(÷=r   