# Path: il2fb/ds/airbridge/typing.py



import io
import logging
import math
import sys
import threading
    import readline
    import pyreadline as readline
from colorama import init as init_colors, Fore, Style
from il2fb.ds.airbridge.typing import StringHandler, StringOrNone

            while self._prompt_is_empty:
                self._prompt_not_empty.wait()

            value, self._prompt_value = self._prompt_value, self._prompt_empty_value
            self._prompt_has_waiters = False

        return value

    @property
    def _prompt_is_empty(self) -> bool:
        return self._prompt_value is self._prompt_empty_value

    def _reset_prompt(self) -> None:
        self._prompt_value = self._prompt_empty_value
        self._prompt_has_waiters = True

    def listen_stdin(self, handler: StringHandler) -> None:
        with self._prompt_mutex:
            self._stdin_listener_thread = threading.Thread(
                target=self._listen_stdin,
                name="stdin",
                kwargs=dict(
                    handler=handler,
                ),
                daemon=True,
            )
            self._stdin_listener_thread.start()
            self._stdin_listener_event.wait()


# Path: il2fb/ds/airbridge/typing.py



# Path: il2fb/ds/airbridge/terminal.py
import io
import logging
import math
import sys
import threading
    import readline
    import pyreadline as readline
from colorama import init as init_colors, Fore, Style
from il2fb.ds.airbridge.typing import StringHandler, StringOrNone


            while self._prompt_is_empty:
                self._prompt_not_empty.wait()

            value, self._prompt_value = self._prompt_value, self._prompt_empty_value
            self._prompt_has_waiters = False

        return value

    @property
    def _prompt_is_empty(self) -> bool:
        return self._prompt_value is self._prompt_empty_value

    def _reset_prompt(self) -> None:
        self._prompt_value = self._prompt_empty_value
        self._prompt_has_waiters = True

    def listen_stdin(self, handler: StringHandler) -> None:
        with self._prompt_mutex:
            self._stdin_listener_thread = threading.Thread(
                target=self._listen_stdin,
                name="stdin",
                kwargs=dict(
                    handler=handler,
                ),
                daemon=True,
            )
            self._stdin_listener_thread.start()
            self._stdin_listener_event.wait()


    def _listen_stdin(self, handler: StringHandler) -> None: