
    3sgZ              	         U d Z ddlmZ ddlZddlZddlmZmZ ddlm	Z	m
Z
mZ e	rddlmZ dZdZd8d	Z G d
 d      Zd9dZd:dZd9dZd;dZd;dZd<dZ G d de      Zh dZd ej6                  dej8                        fd ej6                  ddj;                  e       d      fd ej6                  d      fd ej6                  d      fd ej6                  dej8                        fgZd ed!<   d=d"Z 	 d>	 	 	 	 	 	 	 d?d#Z!d>d@d$Z"dAd%Z#dBd&Z$	 	 	 	 dCd'Z%dDd(Z& G d) d*      Z'd+ Z(d, Z)d- Z* G d. d/      Z+ G d0 d1e+      Z, G d2 d3e+      Z- G d4 d5e-      Z. G d6 d7e+      Z/y)Ez
    babel.numbers
    ~~~~~~~~~~~~~

    CLDR Plural support.  See UTS #35.

    :copyright: (c) 2013-2024 by the Babel Team.
    :license: BSD, see LICENSE for more details.
    )annotationsN)IterableMapping)TYPE_CHECKINGAnyCallable)Literal)zeroonetwofewmanyotherr   c                   t        |       }t        |      }t        |t              r&||k(  r|}nt	        j
                  t        |            }t        |t        j
                        r|j                         }|j                  }|dk  r|j                  |d nd}dj                  d |D              }|j                  d      }t        |      }t        |      }	t        |xs d      }
t        |xs d      }ndx}x}	x}
}dx}}||||	|
|||fS )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  2   K   | ]  }t        |        y wNstr).0ds     ,lib/python3.12/site-packages/babel/plural.py	<genexpr>z#extract_operands.<locals>.<genexpr>G   s     ;?a3q6?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AIAaAq!Q!!    c                  r    e Zd ZdZdZddZddZedd       Ze	dd       Z
e	dd       ZddZdd	Zdd
Zy)
PluralRuleaf  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                j   t        |t              r|j                         }t               }g | _        t        |      D ]t  \  }}|t        vrt        d|      ||v rt        d|d      |j                  |       t        |      j                  }|sX| j                  j                  ||f       v y)a$  Initialize 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exprrD   s         r   __init__zPluralRule.__init__j   s     eW%KKME/1IC,& <w!788 4wn!=>>IIcN$-##C$$c3Z0 'r7   c           	         | j                   }dj                  t        D cg c]  }||v s| d||     c}      }dt        |       j                   d|dS c c}w )N, z: < >)rG   r%   r@   type__name__)rF   rG   tagargss       r   __repr__zPluralRule.__repr__   sd    

yyLYLSCSXLSEE#J<0LYZ4:&&'q22 Zs
   	AAc                6    t        |t              r|S  | |      S )a
  Create 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   )clsrG   s     r   parsezPluralRule.parse   s     eZ(L5zr7   c                    t               j                  }| j                  D ci c]  \  }}| ||       c}}S c c}}w )zThe `PluralRule` as a dict of unicode plural rules.

        >>> rule = PluralRule({'one': 'n is 1'})
        >>> rule.rules
        {'one': 'n is 1'}
        )_UnicodeCompilercompiler:   )rF   _compilerS   rD   s       r   rG   zPluralRule.rules   s;     $%--37==A=xsCXc]"=AAAs   ;c                :    t        d | j                  D              S )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  &   K   | ]	  }|d      yw)r   Nr   )r   r*   s     r   r   z"PluralRule.tags.<locals>.<genexpr>   s     5}!1}s   )	frozensetr:   rF   s    r   tagszPluralRule.tags   s     5t}}555r7   c                    | j                   S r   r:   r`   s    r   __getstate__zPluralRule.__getstate__   s    }}r7   c                    || _         y r   rc   )rF   r:   s     r   __setstate__zPluralRule.__setstate__   s	     r7   c                \    t        | d      st        |       | _        | j                  |      S )Nr;   )hasattr	to_pythonr;   )rF   r)   s     r   __call__zPluralRule.__call__   s%    tW%"4DJzz!}r7   N)rG   z-Mapping[str, str] | Iterable[tuple[str, str]]returnNone)rk   r   )rG   :Mapping[str, str] | Iterable[tuple[str, str]] | PluralRulerk   r9   )rk   zMapping[str, str])rk   zfrozenset[str])rk   list[tuple[str, Any]])r:   rn   rk   rl   )r)   float | decimal.Decimalrk   r   )rR   
__module____qualname____doc__	__slots__rK   rU   classmethodrX   propertyrG   ra   rd   rf   rj   r   r7   r   r9   r9   S   se    ( &I1,3
 	 	 B B 6 6!r7   r9   c                
   t               j                  }dg}t        j                  |       j                  D ]"  \  }}|j                   ||       d|d       $ |j                  dt        z         dj                  |      S )a  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   rX   r:   rE   _fallback_tagr%   )ruleto_jsresultrS   rD   s        r   to_javascriptr~      su      !))E&'F$$T*33SsCwc23 4
MM(]*+776?r7   c           	        t         t        t        t        d}t	               j
                  }ddg}t        j                  |       j                  D ]+  \  }}|j                  d ||       dt        |             - |j                  dt               t        dj                  |      dd	      }t        ||       |d
   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   rX   r:   rE   r   rz   r%   eval)r{   	namespaceto_python_funcr}   rS   rD   codes          r   ri   ri      s    ( #,	I %&..N7F $$T*33S 	nS12*SXLIJ 4 MMH]-./499V$h7DyZ  r7   c                   t         j                  |       } | j                  t        hz  }t	               j
                  }t        D cg c]	  }||v s| c}j                  }dt        |       dg}| j                  D ](  \  }}|j                   ||       d ||       d       * |j                   |t               d       dj                  |      S c c}w )a  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=(rw   rx   z);r   )r9   rX   ra   rz   _GettextCompilerr[   r@   indexr'   r:   rE   r%   )r{   	used_tagsr\   rS   
_get_indexr}   rD   s          r   
to_gettextr      s     D!D		]O+I!))H!-B#	1A#BHHJ#i.)45FMMS#s:c?*;3?@ "
MMZ./r23776? Cs   	CCc                :    | t        |       k(  xr t        | |      S )a  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jAAr7   c                ,     t         fd|D              S )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  <   K   | ]  \  }}|k\  xr |k    y wr   r   )r   min_max_r   s      r   r   z$within_range_list.<locals>.<genexpr>+  s&     HZztTsd{*sd{*Zs   )anyr   s   ` r   r   r     s    " HZHHHr7   c                N    d}| dk  r| dz  } d}|dk  r|dz  }| |z  }|r|dz  }|S )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   .  sH     G1u	R1u	R	
QB
bIr7   c                      e Zd ZdZy)	RuleErrorzRaised if a rule is malformed.N)rR   rp   rq   rr   r   r7   r   r   r   E  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                  d      d   } g }d}t        |       }||k  rnt        D ]N  \  }}|j                  | |      }||j	                         }|r!|j                  ||j                         f        n t        d| |         ||k  rn|d d d   S )N@r   z3malformed CLDR pluralization rule.  Got unexpected r   )splitr'   r   matchendrE   groupr   )sr}   posr   tokr{   r   s          r   tokenize_ruler   ]  s    	QA$&F
C
a&C
)ICJJq#&E iikMM3"67   QRSTWRXQ[\]] ) $B$<r7   c                F    | xr | d   d   |k(  xr |d u xs | d   d   |k(  S )Nr   r   r   r   tokenstype_r   s      r   test_next_tokenr   o  s>    
  2fRjmu, 2	$	0&*Q-502r7   c                >    t        | ||      r| j                         S y r   )r   popr   s      r   
skip_tokenr   x  s    vue,zz| -r7   c                    d| ffS )Nr   r   )r   s    r   
value_noder   }  s    UIr7   c                
    | dfS )Nr   r   )names    r   
ident_noder     s    8Or7   c                
    d| fS )Nr   r   )r   s    r   range_list_noder     s     ##r7   c                    d| ffS )Nnotr   )r   s    r   negater     s    2%<r7   c                  N    e Zd ZdZd ZddZd Zd Zd Zd Z	d	 Z
d
 Zd Zd Zy)rC   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                    t        |      | _        | j                  sd | _        y | j                         | _        | j                  rt	        d| j                  d   d         y )NzExpected end of rule, got r   r   )r   r   rD   	conditionr   )rF   strings     r   rK   z_Parser.__init__  s\    #F+{{ DH>>#;;8R9K8NOPP r7   Nc                    t        | j                  ||      }||S |t        |d u xr |xs |      }| j                  st        d| d      t        d| d| j                  d   d         )Nz	expected z but end of rule reachedz	 but got r   r   )r   r   reprr   )rF   r   r   termtokens        r   expectz_Parser.expect  s~    4;;u5L</%859D{{iv-EFGG)D64;;r?13E2HIJJr7   c                    | j                         }t        | j                  dd      r,d|| j                         ff}t        | j                  dd      r,|S )Nr   or)and_conditionr   r   rF   ops     r   r   z_Parser.condition  sO    !fd3D..011B fd3	r7   c                    | j                         }t        | j                  dd      r,d|| j                         ff}t        | j                  dd      r,|S )Nr   and)relationr   r   r   s     r   r   z_Parser.and_condition  sI    ]]_fe4T]]_--B fe4	r7   c                   | j                         }t        | j                  dd      r1t        | j                  dd      xr dxs d|| j                         ffS t        | j                  dd      }d}t        | j                  dd      rd}n5t        | j                  dd      s|rt	        d      | j                  |      S d||| j                         ff}|rt        |      S |S )	Nr   isr   isnotinwithinz#Cannot negate operator based rules.r   )rJ   r   r   r   r   newfangled_relationr   r   )rF   leftnegatedmethodr   s        r   r   z_Parser.relation  s    yy{dkk640dkk659EgMtzz|$% %T[[&%8dkk684Fdkk648#$IJJ//55&$(9::$vbz,",r7   c                    t        | j                  dd      rd}n%t        | j                  dd      rd}nt        d      dd|| j                         ff}|rt	        |      S |S )	Nr   =Fz!=Tz'Expected "=" or "!=" or legacy relationr   r   )r   r   r   r   r   )rF   r   r   r   s       r   r   z_Parser.newfangled_relation  sa    dkk8S1GXt4GEFF$doo&788$vbz,",r7   c                z    | j                         }t        | j                  d      r|| j                         fS ||fS )Nr   )r   r   r   )rF   r   s     r   range_or_valuez_Parser.range_or_value  s6    zz|dkk:.%%:r7   c                    | j                         g}t        | j                  dd      r7|j                  | j                                t        | j                  dd      r7t	        |      S )Nr   ,)r   r   r   rE   r   )rF   r   s     r   r   z_Parser.range_list  sW    ))+,
h4d1134 h4z**r7   c                2   t        | j                  d      }||d   t        vrt        d      |d   }t        | j                  dd      rd|df| j	                         ffS t        | j                  dd      rd|df| j	                         ffS t        |      S )Nr   r   zExpected identifier variablemodr   r   %)r   r   _VARSr   r   r   )rF   r   r   s      r   rJ   z_Parser.expr  s    $++v.<47%/:;;Awdkk651D":tzz|444Xs3D":tzz|444$r7   c                N    t        t        | j                  d      d               S )Nr   r   )r   r   r   r`   s    r   r   z_Parser.value  s     #dkk'215677r7   )NN)rR   rp   rq   rr   rK   r   r   r   r   r   r   r   rJ   r   r   r7   r   rC   rC     s<    B	QK-"-+	 8r7   rC   c                      fdS )%Compiler factory for the `_Compiler`.c                N    | j                  |      | j                  |      fz  S r   r[   )rF   r   righttmpls      r   <lambda>z"_binary_compiler.<locals>.<lambda>  s!    TT\\$-?eAT,U%Ur7   r   r   s   `r   _binary_compilerr   	  s	    UUr7   c                      fdS )r   c                ,    | j                  |      z  S r   r   )rF   xr   s     r   r   z!_unary_compiler.<locals>.<lambda>  s    4$,,q/1r7   r   r   s   `r   _unary_compilerr     s	    11r7   c                     y)Nr   r   r   s    r   r   r     s    r7   c                      e Zd ZdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Z ed      Z ed      Z ed      Z ed      Z ed      Z ed      Zd Zy)	_CompilerzZThe compilers are able to transform the expressions into multiple
    output formats.
    c                0    |\  }} t        | d|       | S )Ncompile_)getattr)rF   argr   rT   s       r   r[   z_Compiler.compile  s%    D-wtxt_-t44r7   c                     y)Nr)   r   r   s    r   r   z_Compiler.<lambda>      #r7   c                     y)Nr*   r   r   s    r   r   z_Compiler.<lambda>   r  r7   c                     y)Nr0   r   r   s    r   r   z_Compiler.<lambda>!  r  r7   c                     y)Nr1   r   r   s    r   r   z_Compiler.<lambda>"  r  r7   c                     y)Nr2   r   r   s    r   r   z_Compiler.<lambda>#  r  r7   c                     y)Nr3   r   r   s    r   r   z_Compiler.<lambda>$  r  r7   c                     y)Nr4   r   r   s    r   r   z_Compiler.<lambda>%  r  r7   c                     y)Nr5   r   r   s    r   r   z_Compiler.<lambda>&  r  r7   c                    t        |      S r   r   )r   r0   s     r   r   z_Compiler.<lambda>'  s    Qr7   z
(%s && %s)z
(%s || %s)z(!%s)z
(%s %% %s)z
(%s == %s)z
(%s != %s)c                    t               r   )NotImplementedError)rF   r   rJ   r   s       r   compile_relationz_Compiler.compile_relation/  s    !##r7   N)rR   rp   rq   rr   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   r7   r   r   r     s|    5 IIIIIIII'M"<0K!,/J!'*K"<0K!,/J$\2M$r7   r   c                  V    e Zd ZdZ ed      Z ed      Z ed      Z ed      Z	d Z
y)r   z!Compiles an expression to Python.z(%s and %s)z
(%s or %s)z(not %s)zMOD(%s, %s)c                    dj                  |d   D cg c],  \  }}d| j                  |       d| j                  |       d. c}}      }|j                          d| j                  |       d| dS c c}}w )Nr   r   (rM   )z, [z]))r%   r[   upper)rF   r   rJ   r   r   r   rangess          r   r  z _PythonCompiler.compile_relation;  s}    S]^_S`aS`!QQt||A/r$,,q/1B!DS`ab,,.!4<<#5"6c&DD bs   1A5
N)rR   rp   rq   rr   r   r  r  r   r  r  r  r   r7   r   r   r   3  s3    +"=1K!,/J!*-K"=1KEr7   r   c                  >    e Zd ZdZej
                  ZeZeZ	eZ
eZd Zy)r   z)Compile into a gettext plural expression.c                @   g }| j                  |      }|d   D ]o  }|d   |d   k(  r+|j                  d| d| j                  |d          d       9t        | j                   |      \  }}|j                  d| d| d| d| d	       q dd	j                  |       dS )
Nr   r   r  z == r   z >=  && z <= z || )r[   rE   mapr%   )rF   r   rJ   r   r   itemminmaxs           r   r  z!_GettextCompiler.compile_relationI  s    ||D!qMDAw$q'!		AdV4T!W(='>a@At||T2S		AdV4uDd3%qAB " 6;;r?#1%%r7   N)rR   rp   rq   rr   r   r  r  compile_zeror  r  r  r  r  r   r7   r   r   r   @  s)    3##IIIII	&r7   r   c                  ,    e Zd ZdZd ZeZeZeZeZ	d Z
y)ry   z/Compiles the expression to plain of JavaScript.c                     y)NzparseInt(n, 10)r   r   s    r   r   z_JavaScriptCompiler.<lambda>Z  s    +r7   c                z    t         j                  | |||      }|dk(  r| j                  |      }d| d| d| d}|S )Nr   z
(parseInt(z	, 10) == r%  r   )r   r  r[   )rF   r   rJ   r   r   s        r   r  z$_JavaScriptCompiler.compile_relation`  sO    00&$
,T><<%DvYtfDa@Dr7   N)rR   rp   rq   rr   r  r*  r  r  r  r  r  r   r7   r   ry   ry   U  s%    9 ,IIIIIr7   ry   c                  n    e Zd ZdZ ed      Z ed      Z ed      Z ed      Z ed      Z	d Z
d
dZy	)rZ   z+Returns a unicode pluralization rule again.z%s is %sz%s is not %sz	%s and %sz%s or %sz	%s mod %sc                ,     | j                   |d   ddiS )Nr   r   T)r  )rF   r   s     r   r  z_UnicodeCompiler.compile_notv  s    $t$$hqk@4@@r7   c           	     H   g }|d   D ]k  }|d   |d   k(  r$|j                  | j                  |d                2|j                  | j                  |d          d| j                  |d                 m | j                  |       |rdnd d| ddj                  |       S )Nr   r   z..z notr   rO   r   )rE   r[   r%   )rF   r   rJ   r   r   r"  r'  s          r   r  z!_UnicodeCompiler.compile_relationy  s    qMDAw$q'!dll4734d1g!6 7r$,,tAw:O9PQR	 "
 ,,t$%fR%@&388TZK[J\]]r7   N)F)rR   rp   rq   rr   r   r  r  r  r  r  r  r  r   r7   r   rZ   rZ   i  sE    5 "*-J$^4M";/K!*-J";/KA^r7   rZ   )r(   ro   rk   zMtuple[decimal.Decimal | int, int, int, int, int, int, Literal[0], Literal[0]])r{   rm   rk   r   )r{   rm   rk   z(Callable[[float | decimal.Decimal], str])r   ro   r   +Iterable[Iterable[float | decimal.Decimal]]rk   bool)r   r   r   r   rk   r   )r   r   rk   list[tuple[str, str]]r   )r   r3  r   r   r   
str | Nonerk   zlist[tuple[str, str]] | bool)r   r3  r   r   r   r4  )r   r   rk   z#tuple[Literal['value'], tuple[int]])r   r   rk   ztuple[str, tuple[()]])r   r1  rk   zItuple[Literal['range_list'], Iterable[Iterable[float | decimal.Decimal]]])r   ztuple[Any, ...]rk   z-tuple[Literal['not'], tuple[tuple[Any, ...]]])0rr   
__future__r   r    recollections.abcr   r   typingr   r   r   typing_extensionsr	   r@   rz   r6   r9   r~   ri   r   r   r   r   	Exceptionr   r   r[   UNICODEr%   r   __annotations__r   r   r   r   r   r   r   rC   r   r   r*  r   r   r   ry   rZ   r   r7   r   <module>r=     s   #  	 - / /)=8"vZ Zz.%!P.B(I(.)	 )		 
:2::fbjj)*ZRZZ=bggen=MTRSTjbjj !zrzz+&'-rzz:;40 * 2!22 2 "	2
$;$N$w8 w8tV
2
 $ $:
Ei 
E&y &** (^y ^r7   