�
E��c�4 � �� � d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm
Z
dd
lmZ ddlm
Z
ddlmZ dd
lmZ ddlmZ ddlmZ ddlmZ ej e� � Zd;dededefd�Zdeej de ej fd�Zd<dee de e dee fd�Z d<de e
j de e dee fd�Z!dee dee fd�Z"dee dee fd�Z# d<d ee d!e e de
eee f fd"�Z$d=d$edee fd%�Z%dee ddfd&�Z&d'ee ddfd(�Z'd)eddfd*�Z(d+ed,e)d-ed.eddf
d/�Z*dee defd0�Z+ d<d1ed2e
eef f d3eegef d4ed5e e d6ede
eef fd7�Z,d3eegef d8ed6ede
eef fd9�Z-d3eegef d8ed6ede
eef fd:�Z.dS )>z+Contains UI methods for LE user operations.� N)�indent)�Any)�Callable)�Iterable)�List)�Optional)�Tuple)�errors)�
interfaces)�util)�account)�osFT�invalid�optional�returnc � � d}d}d}|r
| r||z
}d}nd}nd} t j | r||z n|d�� � \ }}n)# t j $ r d}t j |� � �w xY w|t j k r*|rt j d� � �t j d � � �t
j |� � r|S |r||z }d}t |� � } ��)
aJ Prompt for valid email address.
:param bool invalid: True if an invalid address was provided by the user
:param bool optional: True if the user can use
--register-unsafely-without-email to avoid providing an e-mail
:returns: e-mail address
:rtype: str
:raises errors.Error: if the user cancels
z-There seem to be problems with that address. zCEnter email address (used for urgent renewal and security notices)
a
If you really want to skip this, you can run the client with --register-unsafely-without-email but you will then be unable to receive notice about impending expiration or revocation of your certificates or problems with your Certbot installation that will lead to failure to renew.
FT��force_interactivezoYou should register before running non-interactively, or provide --agree-tos and --email <email_address> flags.zHAn e-mail address or --register-unsafely-without-email must be provided.z#An e-mail address must be provided.) �display_util�
input_textr
�MissingCommandlineFlag�OK�Errorr �
safe_email�bool)r r �invalid_prefix�msg�unsafe_suggestion�suggest_unsafe�code�emails �5/usr/lib/python3/dist-packages/certbot/display/ops.py� get_emailr# sD � � E�N�
P�C�P�� � �� "��$�$�C�"�N�N�!�N�N���� 5�&�1�'�2Z�.�3�2F�2F�WZ�DH�J� J� J�K�D�%�%���,� 5� 5� 5�O�C��/��4�4�4� 5����
�<�?�"�"��
K��l�J�K� K� K� �,�D�E�E�E��?�5�!�!� ��L�� #�#�c�)�C�"�N��u�+�+��+s � ; �&A!�accountsc � � d� | D � � }t j d|d�� � \ }}|t j k r| | S dS )zChoose an account.
:param list accounts: Containing at least one
:class:`~certbot._internal.account.Account`
c � � g | ] }|j ��
S � )�slug)�.0�accs r" |