
    ̆hHZ              	         % S r SSKJr  SSKrSSKrSSKJrJr  SSKJ	r	J
r
Jr  SrSrS7S jr " S	 S
5      rS8S jrS9S jrS8S jrS:S jrS:S jrS;S jr " S S\5      r1 SkrS\R2                  " S\R4                  5      4S\R2                  " SSR7                  \5       S35      4S\R2                  " S5      4S\R2                  " S5      4S\R2                  " S\R4                  5      4/rS\S '   S<S! jr S=       S>S" jjrS=S?S# jjr S@S$ jr!SAS% jr"    SBS& jr#SCS' jr$ " S( S)5      r%S* r&S+ r'S, r( " S- S.5      r) " S/ S0\)5      r* " S1 S2\)5      r+ " S3 S4\+5      r, " S5 S6\)5      r-g)Dz
babel.numbers
~~~~~~~~~~~~~

CLDR Plural support.  See UTS #35.

:copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
    )annotationsN)IterableMapping)AnyCallableLiteral)zeroonetwofewmanyotherr   c                :   [        U 5      n[        U5      n[        U[        5      (       a'  X!:X  a  UnO[        R
                  " [        U5      5      n[        U[        R
                  5      (       a  UR                  5       nUR                  nUS:  a  UR                  US OSnSR                  S U 5       5      nUR                  S5      n[        U5      n[        U5      n	[        U=(       d    S5      n
[        U=(       d    S5      nOS=n=n	=pS=pXXXX4$ )u  Extract operands from a decimal, a float or an int, according to `CLDR rules`_.

The result is an 8-tuple (n, i, v, w, f, t, c, e), where those symbols are as follows:

====== ===============================================================
Symbol Value
------ ---------------------------------------------------------------
n      absolute value of the source number (integer and decimals).
i      integer digits of n.
v      number of visible fraction digits in n, with trailing zeros.
w      number of visible fraction digits in n, without trailing zeros.
f      visible fractional digits in n, with trailing zeros.
t      visible fractional digits in n, without trailing zeros.
c      compact decimal exponent value: exponent of the power of 10 used in compact decimal formatting.
e      currently, synonym for ‘c’. however, may be redefined in the future.
====== ===============================================================

.. _`CLDR rules`: https://www.unicode.org/reports/tr35/tr35-61/tr35-numbers.html#Operands

:param source: A real number
:type source: int|float|decimal.Decimal
:return: A n-i-v-w-f-t-c-e tuple
:rtype: tuple[decimal.Decimal, int, int, int, int, int, int, int]
r   N  c              3  8   #    U  H  n[        U5      v   M     g 7fNstr).0ds     D/opt/services/DDDS/venv/lib/python3.13/site-packages/babel/plural.py	<genexpr>#extract_operands.<locals>.<genexpr>D   s     ;?a3q66?s   0)absint
isinstancefloatdecimalDecimalr   as_tupleexponentdigitsjoinrstriplen)sourceni	dec_tupleexpfraction_digitstrailingno_trailingvwftces                 r   extract_operandsr6      s    2 	FAAA!U6A A'A!W__%%JJL	  47!G)**34077;?;;ooc*MA q!AIAqQ!!    c                      \ rS rSrSrSrSS jrSS jr\SS j5       r	\
SS j5       r\
SS j5       rSS	 jrSS
 jrSS jrSrg)
PluralRuleP   a*  Represents a set of language pluralization rules.  The constructor
accepts a list of (tag, expr) tuples or a dict of `CLDR rules`_. The
resulting object is callable and accepts one parameter with a positive or
negative number (both integer and float) for the number that indicates the
plural form for a string and returns the tag for the format:

>>> rule = PluralRule({'one': 'n is 1'})
>>> rule(1)
'one'
>>> rule(2)
'other'

Currently the CLDR defines these tags: zero, one, two, few, many and
other where other is an implicit default.  Rules should be mutually
exclusive; for a given numeric value, only one rule should apply (i.e.
the condition should only be true for one of the plural rule elements.

.. _`CLDR rules`: https://www.unicode.org/reports/tr35/tr35-33/tr35-numbers.html#Language_Plural_Rules
)abstract_funcc                   [        U[        5      (       a  UR                  5       n[        5       n/ U l        [        U5       H~  u  p4U[        ;  a  [        SU< 35      eX2;   a  [        SU< S35      eUR                  U5        [        U5      R                  nU(       d  Mb  U R                  R                  X545        M     g)zInitialize the rule instance.

:param rules: a list of ``(tag, expr)``) tuples with the rules
              conforming to UTS #35 or a dict with the tags as keys
              and expressions as values.
:raise RuleError: if the expression is malformed
zunknown tag ztag z defined twiceN)r   r   itemssetr;   sorted_plural_tags
ValueErroradd_Parserastappend)selfrulesfoundkeyexprrE   s         r   __init__PluralRule.__init__g   s     eW%%KKME/1IC,& <w!788 4wn!=>>IIcN$-##Cs$$cZ0 'r7   c           	         U R                   nSR                  [         Vs/ s H  o"U;   d  M
  U SX    3PM     sn5      nS[        U 5      R                   SU< S3$ s  snf )N, z: < >)rH   r%   rA   type__name__)rG   rH   tagargss       r   __repr__PluralRule.__repr__}   sc    

yyLYLSSXL0SEEJ<0LYZ4:&&'q22 Zs
   	AAc                @    [        U[        5      (       a  U$ U " U5      $ )zCreate a `PluralRule` instance for the given rules.  If the rules
are a `PluralRule` object, that object is returned.

:param rules: the rules as list or dict, or a `PluralRule` object
:raise RuleError: if the expression is malformed
)r   r9   )clsrH   s     r   parsePluralRule.parse   s      eZ((L5zr7   c                    [        5       R                  nU R                   VVs0 s H  u  p#X!" U5      _M     snn$ s  snnf )zThe `PluralRule` as a dict of unicode plural rules.

>>> rule = PluralRule({'one': 'n is 1'})
>>> rule.rules
{'one': 'n is 1'}
)_UnicodeCompilercompiler;   )rG   _compilerU   rE   s       r   rH   PluralRule.rules   s9     $%--37==A=xsXc]"=AAAs   <c                :    [        S U R                   5       5      $ )zA set of explicitly defined tags in this rule.  The implicit default
``'other'`` rules is not part of this set unless there is an explicit
rule for it.
c              3  *   #    U  H	  oS    v   M     g7f)r   Nr   )r   r*   s     r   r   "PluralRule.tags.<locals>.<genexpr>   s     5}!1}s   )	frozensetr;   rG   s    r   tagsPluralRule.tags   s     5t}}555r7   c                    U R                   $ r   r;   rf   s    r   __getstate__PluralRule.__getstate__   s    }}r7   c                    Xl         g r   rj   )rG   r;   s     r   __setstate__PluralRule.__setstate__   s     r7   c                f    [        U S5      (       d  [        U 5      U l        U R                  U5      $ )Nr<   )hasattr	to_pythonr<   )rG   r)   s     r   __call__PluralRule.__call__   s(    tW%%"4DJzz!}r7   )r<   r;   N)rH   z-Mapping[str, str] | Iterable[tuple[str, str]]returnNone)ru   r   )rH   :Mapping[str, str] | Iterable[tuple[str, str]] | PluralRuleru   r9   )ru   zMapping[str, str])ru   zfrozenset[str])ru   list[tuple[str, Any]])r;   rx   ru   rv   )r)   float | decimal.Decimalru   r   )rT   
__module____qualname____firstlineno____doc__	__slots__rL   rW   classmethodr[   propertyrH   rg   rk   rn   rs   __static_attributes__r   r7   r   r9   r9   P   se    ( &I1,3
 	 	 B B 6 6!r7   r9   c                   [        5       R                  nS/n[        R                  U 5      R                   H#  u  p4UR                  U" U5       SU< S35        M%     UR                  S[        -  5        SR                  U5      $ )aZ  Convert a list/dict of rules or a `PluralRule` object into a JavaScript
function.  This function depends on no external library:

>>> to_javascript({'one': 'n is 1'})
"(function(n) { return (n == 1) ? 'one' : 'other'; })"

Implementation detail: The function generated will probably evaluate
expressions involved into range operations multiple times.  This has the
advantage that external helper functions are not required and is not a
big performance hit for these simple calculations.

:param rule: the rules as list or dict, or a `PluralRule` object
:raise RuleError: if the expression is malformed
z(function(n) { return  ?  : z%r; })r   )_JavaScriptCompilerr_   r9   r[   r;   rF   _fallback_tagr%   )ruleto_jsresultrU   rE   s        r   to_javascriptr      ss      !))E&'F$$T*33sCwc23 4
MM(]*+776?r7   c           	        [         [        [        [        S.n[	        5       R
                  nSS/n[        R                  U 5      R                   H,  u  pEUR                  SU" U5       S[        U5      < 35        M.     UR                  S[        < 35        [        SR                  U5      SS	5      n[        Xa5        US
   $ )a   Convert a list/dict of rules or a `PluralRule` object into a regular
Python function.  This is useful in situations where you need a real
function and don't are about the actual rule object:

>>> func = to_python({'one': 'n is 1', 'few': 'n in 2..4'})
>>> func(1)
'one'
>>> func(3)
'few'
>>> func = to_python({'one': 'n in 1,11', 'few': 'n in 3..10,13..19'})
>>> func(11)
'one'
>>> func(15)
'few'

:param rule: the rules as list or dict, or a `PluralRule` object
:raise RuleError: if the expression is malformed
)INWITHINMODr6   zdef evaluate(n):z- n, i, v, w, f, t, c, e = extract_operands(n)z if (z
): return z return 
z<rule>execevaluate)in_range_listwithin_range_listcldr_modulor6   _PythonCompilerr_   r9   r[   r;   rF   r   r   r%   eval)r   	namespaceto_python_funcr   rU   rE   codes          r   rr   rr      s    ( #,	I %&..N7F $$T*33 	nS12*SXLIJ 4 MMH]-./499V$h7DZ  r7   c                   [         R                  U 5      n U R                  [        1-  n[	        5       R
                  n[         Vs/ s H  o3U;   d  M
  UPM     snR                  nS[        U5       S3/nU R                   H(  u  p6UR                  U" U5       SU" U5       S35        M*     UR                  U" [        5       S35        SR                  U5      $ s  snf )ag  The plural rule as gettext expression.  The gettext expression is
technically limited to integers and returns indices rather than tags.

>>> to_gettext({'one': 'n is 1', 'two': 'n is 2'})
'nplurals=3; plural=((n == 1) ? 0 : (n == 2) ? 1 : 2);'

:param rule: the rules as list or dict, or a `PluralRule` object
:raise RuleError: if the expression is malformed
z	nplurals=z
; plural=(r   r   z);r   )r9   r[   rg   r   _GettextCompilerr_   rA   indexr'   r;   rF   r%   )r   	used_tagsr`   rU   
_get_indexr   rE   s          r   
to_gettextr      s     D!D		]O+I!))H!-B#	1A#BHHJ#i.)45FMM#s:c?*;3?@ "
MMZ./r23776? Cs   	CCc                B    U [        U 5      :H  =(       a    [        X5      $ )aa  Integer range list test.  This is the callback for the "in" operator
of the UTS #35 pluralization rule language:

>>> in_range_list(1, [(1, 3)])
True
>>> in_range_list(3, [(1, 3)])
True
>>> in_range_list(3, [(1, 3), (5, 8)])
True
>>> in_range_list(1.2, [(1, 4)])
False
>>> in_range_list(10, [(1, 4)])
False
>>> in_range_list(10, [(1, 4), (6, 8)])
False
)r   r   num
range_lists     r   r   r     s    " #c(?A0AAr7   c                .   ^  [        U 4S jU 5       5      $ )a~  Float range test.  This is the callback for the "within" operator
of the UTS #35 pluralization rule language:

>>> within_range_list(1, [(1, 3)])
True
>>> within_range_list(1.0, [(1, 3)])
True
>>> within_range_list(1.2, [(1, 4)])
True
>>> within_range_list(8.8, [(1, 4), (7, 15)])
True
>>> within_range_list(10, [(1, 4)])
False
>>> within_range_list(10.5, [(1, 4), (20, 30)])
False
c              3  R   >#    U  H  u  pUTs=:*  =(       a    U:*  Os  v   M     g 7fr   r   )r   min_max_r   s      r   r   $within_range_list.<locals>.<genexpr>(  s#     @Zztts""d""Zs   $')anyr   s   ` r   r   r     s    " @Z@@@r7   c                Z    SnU S:  a  U S-  n SnUS:  a  US-  nX-  nU(       a  US-  nU$ )zJavaish modulo.  This modulo operator returns the value with the sign
of the dividend rather than the divisor like Python does:

>>> cldr_modulo(-3, 5)
-3
>>> cldr_modulo(-3, -5)
-3
>>> cldr_modulo(3, 5)
3
r      r   )abreverservs       r   r   r   +  sF     G1u	R1u	R	
B
bIr7   c                      \ rS rSrSrSrg)	RuleErroriB  zRaised if a rule is malformed.r   N)rT   rz   r{   r|   r}   r   r   r7   r   r   r   B  s    (r7   r   >   r4   r5   r2   r*   r)   r3   r0   r1   z\s+wordz"\b(and|or|is|(?:with)?in|not|mod|[r   z])\bvaluez\d+symbolz%|,|!=|=ellipsisz\.{2,3}|\u2026z(list[tuple[str | None, re.Pattern[str]]]_RULESc                J   U R                  S5      S   n / nSn[        U 5      nX#:  at  [         HR  u  pEUR                  X5      nUc  M  UR	                  5       nU(       a   UR                  XFR                  5       45          O   [        SX   < 35      eX#:  a  Mt  US S S2   $ )N@r   z3malformed CLDR pluralization rule.  Got unexpected r   )splitr'   r   matchendrF   groupr   )sr   posr   tokr   r   s          r   tokenize_ruler   Z  s    	QA$&F
C
a&C
)ICJJq&E iikMM3"67   QRSRXQ[\]] ) $B$<r7   c                d    U =(       a(    U S   S   U:H  =(       a    US L =(       d    U S   S   U:H  $ )Nr   r   r   r   tokenstype_r   s      r   test_next_tokenr   l  s>    
  2fRjmu, 2	$	0&*Q-502r7   c                F    [        XU5      (       a  U R                  5       $ g r   )r   popr   s      r   
skip_tokenr   u  s     ve,,zz| -r7   c                    SU 44$ )Nr   r   )r   s    r   
value_noder   z  s    UIr7   c                
    U S4$ )Nr   r   )names    r   
ident_noder   ~  s    8Or7   c                
    SU 4$ )Nr   r   )r   s    r   range_list_noder     s     ##r7   c                    SU 44$ )Nnotr   )r   s    r   negater     s    2%<r7   c                  X    \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rS rSrg)rD   i  u  Internal parser.  This class can translate a single rule into an abstract
tree of tuples. It implements the following grammar::

    condition     = and_condition ('or' and_condition)*
                    ('@integer' samples)?
                    ('@decimal' samples)?
    and_condition = relation ('and' relation)*
    relation      = is_relation | in_relation | within_relation
    is_relation   = expr 'is' ('not')? value
    in_relation   = expr (('not')? 'in' | '=' | '!=') range_list
    within_relation = expr ('not')? 'within' range_list
    expr          = operand (('mod' | '%') value)?
    operand       = 'n' | 'i' | 'f' | 't' | 'v' | 'w'
    range_list    = (range | value) (',' range_list)*
    value         = digit+
    digit         = 0|1|2|3|4|5|6|7|8|9
    range         = value'..'value
    samples       = sampleRange (',' sampleRange)* (',' ('…'|'...'))?
    sampleRange   = decimalValue '~' decimalValue
    decimalValue  = value ('.' value)?

- Whitespace can occur between or around any of the above tokens.
- Rules should be mutually exclusive; for a given numeric value, only one
  rule should apply (i.e. the condition should only be true for one of
  the plural rule elements).
- The in and within relations can take comma-separated lists, such as:
  'n in 3,5,7..15'.
- Samples are ignored.

The translator parses the expression on instantiation into an attribute
called `ast`.
c                    [        U5      U l        U R                  (       d  S U l        g U R                  5       U l        U R                  (       a  [	        SU R                  S   S   < 35      eg )NzExpected end of rule, got r   r   )r   r   rE   	conditionr   )rG   strings     r   rL   _Parser.__init__  s\    #F+{{ DH>>#;;8R9K8NOPP r7   Nc                    [        U R                  X5      nUb  U$ Uc  [        US L =(       a    U=(       d    U5      nU R                  (       d  [        SU S35      e[        SU SU R                  S   S   < 35      e)Nz	expected z but end of rule reachedz	 but got r   r   )r   r   reprr   )rG   r   r   termtokens        r   expect_Parser.expect  s|    4;;5L</%859D{{iv-EFGG)D64;;r?13E2HIJJr7   c                    U R                  5       n[        U R                  SS5      (       a1  SXR                  5       44n[        U R                  SS5      (       a  M1  U$ )Nr   or)and_conditionr   r   rG   ops     r   r   _Parser.condition  sS    !fd33..011B fd33	r7   c                    U R                  5       n[        U R                  SS5      (       a1  SXR                  5       44n[        U R                  SS5      (       a  M1  U$ )Nr   and)relationr   r   r   s     r   r   _Parser.and_condition  sM    ]]_fe44]]_--B fe44	r7   c                   U R                  5       n[        U R                  SS5      (       a:  [        U R                  SS5      =(       a    S=(       d    SXR                  5       44$ [        U R                  SS5      nSn[        U R                  SS5      (       a  SnO?[        U R                  SS5      (       d#  U(       a  [	        S5      eU R                  U5      $ SX1U R                  5       44nU(       a  [        U5      $ U$ )	Nr   isr   isnotinwithinz#Cannot negate operator based rules.r   )rK   r   r   r   r   newfangled_relationr   r   )rG   leftnegatedmethodr   s        r   r   _Parser.relation  s    yy{dkk6400dkk659EgMzz|$% %T[[&%8dkk6844Fdkk6488#$IJJ//55&(9::$vbz,",r7   c                    [        U R                  SS5      (       a  SnO*[        U R                  SS5      (       a  SnO[        S5      eSSXR                  5       44nU(       a  [	        U5      $ U$ )	Nr   =Fz!=Tz'Expected "=" or "!=" or legacy relationr   r   )r   r   r   r   r   )rG   r   r   r   s       r   r   _Parser.newfangled_relation  se    dkk8S11GXt44GEFF$oo&788$vbz,",r7   c                    U R                  5       n[        U R                  S5      (       a  XR                  5       4$ X4$ )Nr   )r   r   r   )rG   r   s     r   range_or_value_Parser.range_or_value  s5    zz|dkk:..%%:r7   c                    U R                  5       /n[        U R                  SS5      (       a=  UR                  U R                  5       5        [        U R                  SS5      (       a  M=  [	        U5      $ )Nr   ,)r   r   r   rF   r   )rG   r   s     r   r   _Parser.range_list  s]    ))+,
h44d1134 h44z**r7   c                L   [        U R                  S5      nUb  US   [        ;  a  [        S5      eUS   n[        U R                  SS5      (       a  SUS4U R	                  5       44$ [        U R                  SS5      (       a  SUS4U R	                  5       44$ [        U5      $ )Nr   r   zExpected identifier variablemodr   r   %)r   r   _VARSr   r   r   )rG   r   r   s      r   rK   _Parser.expr  s    $++v.<47%/:;;Awdkk6511D":tzz|444Xs33D":tzz|444$r7   c                N    [        [        U R                  S5      S   5      5      $ )Nr   r   )r   r   r   rf   s    r   r   _Parser.value  s     #dkk'215677r7   )rE   r   )NN)rT   rz   r{   r|   r}   rL   r   r   r   r   r   r   r   rK   r   r   r   r7   r   rD   rD     s<    B	QK-"-+	 8r7   rD   c                   ^  U 4S j$ )%Compiler factory for the `_Compiler`.c                N   > TU R                  U5      U R                  U5      4-  $ r   r_   )rG   r   righttmpls      r   <lambda>"_binary_compiler.<locals>.<lambda>  s!    TT\\$-?eAT,U%Ur7   r   r  s   `r   _binary_compilerr    s	    UUr7   c                   ^  U 4S j$ )r  c                ,   > TU R                  U5      -  $ r   r  )rG   xr  s     r   r	  !_unary_compiler.<locals>.<lambda>  s    4$,,q/1r7   r   r  s   `r   _unary_compilerr    s	    11r7   c                    g)Nr   r   r  s    r   r	  r	    s    r7   c                      \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS r\" S5      r\" S5      r\" S5      r\" S5      r\" S5      r\" S5      rS rSrg)	_Compileri  zRThe compilers are able to transform the expressions into multiple
output formats.
c                .    Uu  p#[        U SU 35      " U6 $ )Ncompile_)getattr)rG   argr   rV   s       r   r_   _Compiler.compile  s!    txt_-t44r7   c                    g)Nr)   r   r  s    r   r	  _Compiler.<lambda>      #r7   c                    g)Nr*   r   r  s    r   r	  r    r  r7   c                    g)Nr0   r   r  s    r   r	  r    r  r7   c                    g)Nr1   r   r  s    r   r	  r    r  r7   c                    g)Nr2   r   r  s    r   r	  r     r  r7   c                    g)Nr3   r   r  s    r   r	  r  !  r  r7   c                    g)Nr4   r   r  s    r   r	  r  "  r  r7   c                    g)Nr5   r   r  s    r   r	  r  #  r  r7   c                    [        U5      $ r   r   )r  r0   s     r   r	  r  $  s    Qr7   z
(%s && %s)z
(%s || %s)z(!%s)z
(%s %% %s)z
(%s == %s)z
(%s != %s)c                    [        5       er   )NotImplementedError)rG   r   rK   r   s       r   compile_relation_Compiler.compile_relation,  s    !##r7   r   N)rT   rz   r{   r|   r}   r_   	compile_n	compile_i	compile_v	compile_w	compile_f	compile_t	compile_c	compile_ecompile_valuer  compile_and
compile_orr  compile_notcompile_mod
compile_iscompile_isnotr(  r   r   r7   r   r  r    s|    5 IIIIIIII'M"<0K!,/J!'*K"<0K!,/J$\2M$r7   r  c                  ^    \ rS rSrSr\" S5      r\" S5      r\" S5      r	\" S5      r
S rSrg	)
r   i0  z!Compiles an expression to Python.z(%s and %s)z
(%s or %s)z(not %s)zMOD(%s, %s)c                    SR                  US    VVs/ s H,  u  pESU R                  U5       SU R                  U5       S3PM.     snn5      nUR                  5        SU R                  U5       SU S3$ s  snnf )Nr   r   (rO   )z, [z]))r%   r_   upper)rG   r   rK   r   r   r   rangess          r   r(   _PythonCompiler.compile_relation8  s{    S]^_S`aS`!Qt||A/r$,,q/1B!DS`ab,,.!4<<#5"6c&DD bs   3A7
r   N)rT   rz   r{   r|   r}   r  r3  r4  r  r5  r6  r(  r   r   r7   r   r   r   0  s3    +"=1K!,/J!*-K"=1KEr7   r   c                  F    \ rS rSrSr\R                  r\r	\r
\r\rS rSrg)r   i=  z)Compile into a gettext plural expression.c                F   / nU R                  U5      nUS    Hq  nUS   US   :X  a,  UR                  SU SU R                  US   5       S35        M;  [        U R                   U5      u  pgUR                  SU SU SU SU S3	5        Ms     SS	R                  U5       S3$ )
Nr   r   r;  z == r<  z >=  && z <= z || )r_   rF   mapr%   )rG   r   rK   r   r   itemminmaxs           r   r(  !_GettextCompiler.compile_relationF  s    ||D!qMDAw$q'!		AdV4T!W(='>a@At||T2		AdV4uDd3%qAB " 6;;r?#1%%r7   r   N)rT   rz   r{   r|   r}   r  r*  r+  compile_zeror,  r-  r.  r/  r(  r   r   r7   r   r   r   =  s)    3##IIIII	&r7   r   c                  4    \ rS rSrSrS r\r\r\r	\r
S rSrg)r   iR  z/Compiles the expression to plain of JavaScript.c                    g)NzparseInt(n, 10)r   r  s    r   r	  _JavaScriptCompiler.<lambda>W  s    +r7   c                x    [         R                  XX#5      nUS:X  a  U R                  U5      nSU SU SU S3nU$ )Nr   z
(parseInt(z	, 10) == rB  r<  )r   r(  r_   )rG   r   rK   r   r   s        r   r(  $_JavaScriptCompiler.compile_relation]  sK    00$,T><<%DvYtfDa@Dr7   r   N)rT   rz   r{   r|   r}   r+  rH  r,  r-  r.  r/  r(  r   r   r7   r   r   r   R  s%    9 ,IIIIIr7   r   c                  x    \ rS rSrSr\" S5      r\" S5      r\" S5      r\" S5      r	\" S5      r
S rSS	 jrS
rg)r^   if  z+Returns a unicode pluralization rule again.z%s is %sz%s is not %sz	%s and %sz%s or %sz	%s mod %sc                ,    U R                   " US   SS06$ )Nr   r   T)r(  )rG   r   s     r   r5  _UnicodeCompiler.compile_nots  s    $$hqk@4@@r7   c           	     Z   / nUS    Hn  nUS   US   :X  a%  UR                  U R                  US   5      5        M4  UR                  U R                  US   5       SU R                  US   5       35        Mp     U R                  U5       U(       a  SOS SU SSR                  U5       3$ )Nr   r   z..z notr   rQ   r   )rF   r_   r%   )rG   r   rK   r   r   r>  rD  s          r   r(  !_UnicodeCompiler.compile_relationv  s    qMDAw$q'!dll4734d1g!6 7r$,,tAw:O9PQR	 "
 ,,t$%fR%@&388TZK[J\]]r7   r   N)F)rT   rz   r{   r|   r}   r  r7  r8  r3  r4  r6  r5  r(  r   r   r7   r   r^   r^   f  sE    5 "*-J$^4M";/K!*-J";/KA^r7   r^   )r(   ry   ru   zMtuple[decimal.Decimal | int, int, int, int, int, int, Literal[0], Literal[0]])r   rw   ru   r   )r   rw   ru   z(Callable[[float | decimal.Decimal], str])r   ry   r   +Iterable[Iterable[float | decimal.Decimal]]ru   bool)r   r   r   r   ru   r   )r   r   ru   list[tuple[str, str]]r   )r   rU  r   r   r   
str | Noneru   zlist[tuple[str, str]] | bool)r   rU  r   r   r   rV  )r   r   ru   z#tuple[Literal['value'], tuple[int]])r   r   ru   ztuple[str, tuple[()]])r   rS  ru   zItuple[Literal['range_list'], Iterable[Iterable[float | decimal.Decimal]]])r   ztuple[Any, ...]ru   z-tuple[Literal['not'], tuple[tuple[Any, ...]]]).r}   
__future__r   r    recollections.abcr   r   typingr   r   r   rA   r   r6   r9   r   rr   r   r   r   r   	Exceptionr   r   r_   UNICODEr%   r   __annotations__r   r   r   r   r   r   r   rD   r  r  rH  r  r   r   r   r^   r   r7   r   <module>r^     s   #  	 - ) )=8"vZ Zz.%!P.B(A(.)	 )		 
2::fbjj)*RZZ=bggen=MTRSTbjj !rzz+&'-rzz:;40 * 2!22 2 "	2
$;$N$w8 w8tV
2
 $ $:
Ei 
E&y &** (^y ^r7   