j7i JddlmZddlmZddlZedddZddZy) ) annotations) lru_cacheNdct|}d|cxkrdkry|dk(s(d|cxkrdksnd|cxkrdksnd |cxkrd krynytj|}|d k(ry |d vrytj|dvryy)zDetermine how many columns are needed to display a character in a terminal. Returns -1 if the character is not printable. Returns 0, 1 or 2 for other characters. ri i i( i. i` ic Cc)MeMn)FW)ord unicodedatacategoryeast_asian_width)cors \/mnt/ssd/data/python-lab/ChefSystem/venv/lib/python3.12/site-packages/_pytest/_io/wcwidth.pywcwidthrs AA q5 V Q & Q & Q &  !##A&H4<##A&*4 cnd}tjd|D]}t|}|dkry||z }|S)zDetermine how many columns are needed to display a string in a terminal. Returns -1 if the string contains non-printable characters. rNFCr )r normalizer)swidthrwcs rwcswidthr .sH E  " "5! , QZ 6    Lr)rstrreturnint)rr!r"r#) __future__r functoolsrrrr rrr's," 3# # L r