o
    j                     @  sH   d Z ddlmZ ddlZddlmZ ddlmZ edddddZdS )z
Lazy-loading per-terminal grapheme override tables.

This minimizes memory for the 99.9% of use-cases of a single 'term_program'.
    )annotationsN)	lru_cache   )	_REGISTRY    )maxsizeterm_canonicalstrreturndict[str, int]c                 C  sP   t | }|du ri S ztd| t}t|d}|W S  ty'   i  Y S w )z
    Return grapheme override dict for a terminal, or an empty dict.

    The per-terminal module is imported on first access and cached in ``sys.modules``; subsequent
    calls for the same terminal return immediately via lru_cache.
    Nz._known_	GRAPHEMES)r   get	importlibimport_module__package__getattrImportError)r   hash_keymodresult r   /root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/wcwidth/table_grapheme_overrides/__init__.pyr      s   

r   )r   r	   r
   r   )	__doc__
__future__r   r   	functoolsr   	_registryr   r   r   r   r   r   <module>   s    