2bi SSKrSSKJr SSKJrJr SSKJr \R"S5Rr \"S5S\ S \ 4S j5r \ 4S\ S \\ /\ 4S \ 4S jjr\"SS 9S\ S \ 4Sj5r\"SS 9S\ S \ 4Sj5rS\ S\ S \ 4SjrSS\ S\ S\ S \\ 4Sjjr\S:XaU\"\"S55 \"SS5H r\"\5 M \"SSS5H r\"\"S\5S-5 \"S\-5 M" gg) N) lru_cache)CallableList) CELL_WIDTHSu^[ -o ˿Ͱ-҂]*$itextreturnc>^[m[U4SjU55nU$)aGet the number of cells required to display text. This method always caches, which may use up a lot of memory. It is recommended to use `cell_len` over this method. Args: text (str): Text to display. Returns: int: Get the number of cells required to display text. c34># UH nT"U5v M g7fN.0 character _get_sizes ڈ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/rich/cells.py "cached_cell_len..@4iYy))4)get_character_cell_sizesum)r total_sizers @rcached_cell_lenr s (I@4@@J  _cell_lencl^[U5S:aU"U5$[m[U4SjU55nU$)zGet the number of cells required to display text. Args: text (str): Text to display. Returns: int: Get the number of cells required to display text. ic34># UH nT"U5v M g7fr r rs rrcell_len..)rr)lenrr)rrrrs @rcell_lenr!s5 4y3'I@4@@J r)maxsizerc*[[U55$)zGet the cell size of a character. Args: character (str): A single character. Returns: int: Number of cells (0, 1 or 2) occupied by that character. )_get_codepoint_cell_sizeord)rs rrr-s $C N 33r codepointc[nSn[U5S- nX#-S-nXupVnX:aUS- nOX:aUS-nO US:XaS$U$X2:agX#-S-nM7)zGet the cell size of a character. Args: codepoint (int): Codepoint of a character. Returns: int: Number of cells (0, 1 or 2) occupied by that character. rr)rr )r&_table lower_bound upper_boundindexstartendwidths rr$r$:sFKf+/K  &1 ,E "ME  !)K _!)K 1 . .  $  *q0 rtotalcj[U5(a[U5nX!:a USX- --$USU$US::ag[U5nX1:XaU$X1:a USX- --$Sn[U5nXE-S-nUSUS-n[U5nXS-:Xa[US5S:XaUSSS-$X:XaU$X:aUnOUnMO)z?Set the length of a string to fit within given number of cells. Nrr(rr))_is_single_cell_widthsr r!) rr1size cell_sizer.r/posbefore before_lens r set_cell_sizer;Wsd##4y <#.. .FU| zI cU./// E d)C {q iaf%  "xr ';q'@#2;$ $  M  CE rmax_sizepositioncZ[nUVs/sH oDU"U54PM nnUn//nUSRn[U5H>upIXi-U:a%URU/5 USRnU nM2Xi- nU"U5 M@ UV s/sHn SRU 5PM sn $s snfs sn f)zWBreak text in to equal (cell) length strings, returning the characters in reverse orderr)r4)rappendreversedjoin) rr<r=_get_character_cell_sizer charactersrlinesr?r6lines r chop_cellsrF|s 7JNJNY,Y78$J TE 2Y  F#J/  x ' LL) %2Y%%FJ  J 9 0', ,edBGGDMe ,,! -s B#B(__main__u😽u]这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑。Pr)|x)r)re functoolsrtypingrr _cell_widthsrcompilematchr5strintrr!rr$r;rF__name__printrErangenr rrrXs !%$QRXX 4##";J 3 8SE3J#7 c   4 4s 4s 4 4 4    8  C C J-S-C-3-tCy-. z !& )*~ABC d C 2q"  mBCDGJJ K cAg r