§
    Ìtºf™  ã                   óš   — d dl Z d dlZd dlmZ d dlmZ d dlmZ dZ	 	 	 dd	ed
e	de	de
def
d„Zedk    rd dlmZ d„ Z ee¦  «         dS dS )é    N)ÚDeferred)ÚIReactorProcess)ÚgetProcessOutput)Úget_input_from_dialogú
Unlock keyú%Please enter passphrase to unlock keyTÚreactorÚtitleÚtextÚ	hide_textÚreturnc                 óö   — t          j        d¦  «        }|st          d¦  «        ‚dd|d|g}|r|                     d¦  «         t	          ||t
          j        | ¬¦  «        }d„ }|                     |¦  «         |S )	aí  
    Show a Gnome/GTK desktop dialog asking for a passphrase.

    This is using zenity, the GNOME port of dialog which allows you to display dialog boxes
    from the commandline and shell scripts. To install (on Linux):

    .. code:: console

        sudo apt update
        sudo install zenity

    See also:

    - https://gitlab.gnome.org/GNOME/zenity
    - https://wiki.ubuntuusers.de/Zenity/
    - https://bash.cyberciti.biz/guide/Zenity:_Shell_Scripting_with_Gnome

    :param reactor: Twisted reactor to use.
    :param title: Dialog window title to show.
    :param text: Dialog text to show above text entry field.
    :param hide_text: Hide entry field text.

    :return: A deferred that resolves with the string the user entered.
    ÚzenityzRget_input_from_dialog(): could not find zenity (install with "apt install zenity")z--entryz--titlez--textz--hide-text)ÚargsÚenvr	   c                 óT   — |                       d¦  «                             ¦   «         }|S )NÚutf8)ÚdecodeÚstrip)ÚoutputÚ
passphrases     úS/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/autobahn/xbr/_dialog.pyÚ_consumez'get_input_from_dialog.<locals>._consumeH   s%   € Ø—]’] 6Ñ*Ô*×0Ò0Ñ2Ô2ˆ
ØÐó    )ÚshutilÚwhichÚRuntimeErrorÚappendr   ÚosÚenvironÚaddCallback)r	   r
   r   r   Úexer   Údr   s           r   r   r   %   s•   € õ6 Œ,�xÑ
 Ô
 €CØð qÝÐoÑpÔpÐpØ�y %¨°4Ð8€DØð #Ø�Š�MÑ"Ô"Ð"Ý˜ 4­R¬ZÀÐIÑIÔI€Aðð ð ð ‡M‚M�(ÑÔÐØ€Hr   Ú__main__)Úreactc              ƒ   ó°   K  — t          | ¦  «        ƒ d {V —†}t          t          |¦  «        t          |¦  «        d                     |¦  «        ¦  «         d S )Nz"{}")r   ÚprintÚtypeÚlenÚformat)r	   r   s     r   Úmainr+   S   sW   è è € Ý0°Ñ9Ô9Ð9Ð9Ð9Ð9Ð9Ð9ˆ
Ý�d�:ÑÔ¥ J¡¤°·²¸zÑ1JÔ1JÑKÔKÐKÐKÐKr   )r   r   T)r   r   Útwisted.internet.deferr   Útwisted.internet.interfacesr   Útwisted.internet.utilsr   Ú__all__ÚstrÚboolr   Ú__name__Útwisted.internet.taskr%   r+   © r   r   ú<module>r5      sí   ðð6 
€	€	€	Ø €€€à +Ð +Ð +Ð +Ð +Ð +Ø 7Ð 7Ð 7Ð 7Ð 7Ð 7Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3à
$€ð BNØ&MØ,0ð(ð ( ?ð (¸3ð (Ø #ð(à%)ð(à5=ð(ð (ð (ð (ðV ˆzÒÐØ+Ð+Ð+Ð+Ð+Ð+ðLð Lð Lð 
€Eˆ$�K„K€K€K€Kð Ðr   