
    ci                     F   d dl Z d dlZd dlmZmZ d dlmZmZmZm	Z	m
Z
mZ ddlmZmZmZ eeef         Zee
e         ef         ZeZ G d de          Z G d d	e          Z G d
 de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z  G d  d!e          Z! G d" d#e          Z" G d$ d%e          Z# G d& d'e          Z$ G d( d)e          Z% G d* d+e          Z& G d, d-e          Z' G d. d/e          Z( G d0 d1e          Z) G d2 d3e          Z*d4ed5d6fd7Z+d4ed5d6fd8Z,d9ed5d6fd:Z-dS );    N)ABCabstractmethod)AnyDictOptionalTupleTypeUnion   )DocumentBaseInstrumentedExpressionInstrumentedFieldc                       e Zd ZdZededdfd            Zededdfd            Zed	e	dd
fd            Z
edd            ZdS )ESQLzThe static methods of the ``ESQL`` class provide access to the ES|QL source
    commands, used to create ES|QL queries.

    These methods return an instance of class ``ESQLBase``, which provides access to
    the ES|QL processing commands.
    indicesreturnFromc                      t          |  S )a#  The ``FROM`` source command returns a table with data from a data stream, index, or alias.

        :param indices: A list of indices, data streams or aliases. Supports wildcards and date math.

        Examples::

            query1 = ESQL.from_("employees")
            query2 = ESQL.from_("<logs-{now/d}>")
            query3 = ESQL.from_("employees-00001", "other-employees-*")
            query4 = ESQL.from_("cluster_one:employees-00001", "cluster_two:other-employees-*")
            query5 = ESQL.from_("employees").metadata("_id")
        )r   )r   s    W/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/elasticsearch/esql/esql.pyfrom_z
ESQL.from_&   s     W~    paramsRowc                      t          di | S )a  The ``ROW`` source command produces a row with one or more columns with values that you specify.
        This can be useful for testing.

        :param params: the column values to produce, given as keyword arguments.

        Examples::

            query1 = ESQL.row(a=1, b="two", c=None)
            query2 = ESQL.row(a=[1, 2])
            query3 = ESQL.row(a=functions.round(1.23, 0))
         )r   )r   s    r   rowzESQL.row6   s     }}V}}r   itemShowc                      t          |           S )zThe ``SHOW`` source command returns information about the deployment and its capabilities.

        :param item: Can only be ``INFO``.

        Examples::

            query = ESQL.show("INFO")
        )r   )r   s    r   showz	ESQL.showE   s     Dzzr   Branchc                      t                      S )a  This method can only be used inside a ``FORK`` command to create each branch.

        Examples::

            query = ESQL.from_("employees").fork(
                ESQL.branch().where("emp_no == 10001"),
                ESQL.branch().where("emp_no == 10002"),
            )
        )r!   r   r   r   branchzESQL.branchQ   s     xxr   N)r   r!   )__name__
__module____qualname____doc__staticmethod	IndexTyper   ExpressionTyper   strr    r#   r   r   r   r   r      s          	 f    \ n     \ 	3 	6 	 	 	 \	 
 
 
 \
 
 
r   r   c                   v   e Zd ZdZdJded          fdZdefdZdefdZe	defd            Z
ed	edefd
            ZedKdededefd            Zededefd            ZdefdZdeddfdZdededdfdZdededdfdZdeddfdZd edd!fd"Zded#edd$fd%Z	 	 	 	 	 	 	 dLd&d d'ed          d(ed          d)ed          d*ed          d+ed          d,ed          d-ed          dd.fd/Zdededd0fd1Zdedd2fd3Zd4edd5fd6Zd7edd8fd9Zd:edd;fd<Z dedd=fd>Z!d?e"dd@fdAZ#deddBfdCZ$dDedEeddFfdGZ%dDeddHfdIZ&dS )MESQLBasez|The methods of the ``ESQLBase`` class provide access to the ES|QL processing
    commands, used to build ES|QL queries.
    Nparentc                     || _         d S N)_parent)selfr.   s     r   __init__zESQLBase.__init__d   s    r   r   c                 *    |                                  S r0   )renderr2   s    r   __repr__zESQLBase.__repr__g   s    {{}}r   c                 v    | j         r| j                                         dz   nd|                                 z   S )Nz
|  )r1   r5   _render_internalr6   s    r   r5   zESQLBase.renderj   s=    .2lBDL!!F**!!##$ 	$r   c                     d S r0   r   r6   s    r   r:   zESQLBase._render_internalo   s    r   indexc                 X    t          | d          r| j        j        nt          |           S )N_index)hasattrr>   _namer+   )r<   s    r   _format_indexzESQLBase._format_indexs   s'    %,UH%=%=Mu|!!3u::Mr   Fidallow_patternsc                     t          |           }|rd|v r|S t          j        d|          r|S |                    dd           d| dS )N*z[a-zA-Z_@][a-zA-Z0-9_\.]*`z``)r+   re	fullmatchreplace)rB   rC   ss      r   
_format_idzESQLBase._format_idw   s]    GG 	cQhhH<4a88 	H			#t1xxxr   exprc                     t          | t          t          f          st          j        |           nt          |           S r0   )
isinstancer+   r   jsondumps)rL   s    r   _format_exprzESQLBase._format_expr   s9     dS*@$ABBDJtT	
r   c                 j    | j         j        dk    rdS | j        r| j                                        S dS )NForkTF)	__class__r$   r1   
_is_forkedr6   s    r   rU   zESQLBase._is_forked   s:    >"f,,4< 	-<**,,,ur   valueChangePointc                 "    t          | |          S )a  `CHANGE_POINT` detects spikes, dips, and change points in a metric.

        :param value: The column with the metric in which you want to detect a change point.

        Examples::

            query = (
                ESQL.row(key=list(range(1, 26)))
                .mv_expand("key")
                .eval(value=functions.case("key<13", 0, 42))
                .change_point("value")
                .on("key")
                .where("type IS NOT NULL")
            )
        )rW   )r2   rV   s     r   change_pointzESQLBase.change_point   s      4'''r   promptnamed_prompt
Completionc                 "    t          | g|R i |S )a  The `COMPLETION` command allows you to send prompts and context to a Large
        Language Model (LLM) directly within your ES|QL queries, to perform text
        generation tasks.

        :param prompt: The input text or expression used to prompt the LLM. This can
                       be a string literal or a reference to a column containing text.
        :param named_prompt: The input text or expresion, given as a keyword argument.
                             The argument name is used for the column name. If not
                             specified, the results will be stored in a column named
                             `completion`. If the specified column already exists, it
                             will be overwritten with the new results.

        Examples::

            query1 = (
                ESQL.row(question="What is Elasticsearch?")
                .completion("question").with_("test_completion_model")
                .keep("question", "completion")
            )
            query2 = (
                ESQL.row(question="What is Elasticsearch?")
                .completion(answer="question").with_("test_completion_model")
                .keep("question", "answer")
            )
            query3 = (
                ESQL.from_("movies")
                .sort("rating DESC")
                .limit(10)
                .eval(prompt="""CONCAT(
                    "Summarize this movie using the following information: \n",
                    "Title: ", title, "\n",
                    "Synopsis: ", synopsis, "\n",
                    "Actors: ", MV_CONCAT(actors, ", "), "\n",
                )""")
                .completion(summary="prompt").with_("test_completion_model")
                .keep("title", "summary", "rating")
            )
        )r\   )r2   rZ   r[   s      r   
completionzESQLBase.completion   s#    R $8888<888r   inputpatternDissectc                 $    t          | ||          S )a  ``DISSECT`` enables you to extract structured data out of a string.

        :param input: The column that contains the string you want to structure. If
                      the column has multiple values, ``DISSECT`` will process each value.
        :param pattern: A dissect pattern. If a field name conflicts with an existing
                        column, the existing column is dropped. If a field name is used
                        more than once, only the rightmost duplicate creates a column.

        Examples::

            query = (
                ESQL.row(a="2023-01-23T12:15:00.000Z - some text - 127.0.0.1")
                .dissect("a", "%{date} - %{msg} - %{ip}")
                .keep("date", "msg", "ip")
                .eval(date="TO_DATETIME(date)")
            )
        )ra   r2   r_   r`   s      r   dissectzESQLBase.dissect   s    $ tUG,,,r   columnsDropc                     t          | g|R  S )a4  The ``DROP`` processing command removes one or more columns.

        :param columns: The columns to drop, given as positional arguments. Supports wildcards.

        Examples::

            query1 = ESQL.from_("employees").drop("height")
            query2 = ESQL.from_("employees").drop("height*")
        )rf   r2   re   s     r   dropzESQLBase.drop   s     D#7####r   policyEnrichc                 "    t          | |          S )a0  ``ENRICH`` enables you to add data from existing indices as new columns using an
        enrich policy.

        :param policy: The name of the enrich policy. You need to create and execute the
                       enrich policy first.

        Examples::

            query1 = (
                ESQL.row(a="1")
                .enrich("languages_policy").on("a").with_("language_name")
            )
            query2 = (
                ESQL.row(a="1")
                .enrich("languages_policy").on("a").with_(name="language_name")
            )
        )rk   )r2   rj   s     r   enrichzESQLBase.enrich   s    $ dF###r   named_columnsEvalc                 "    t          | g|R i |S )a{  The ``EVAL`` processing command enables you to append new columns with calculated values.

        :param columns: The values for the columns, given as positional arguments. Can be literals,
                        expressions, or functions. Can use columns defined left of this one.
        :param named_columns: The values for the new columns, given as keyword arguments. The name
                              of the arguments is used as column name. If a column with the same
                              name already exists, the existing column is dropped. If a column name
                              is used more than once, only the rightmost duplicate creates a column.

        Examples::

            query1 = (
                ESQL.from_("employees")
                .sort("emp_no")
                .keep("first_name", "last_name", "height")
                .eval(height_feet="height * 3.281", height_cm="height * 100")
            )
            query2 = (
                ESQL.from_("employees")
                .eval("height * 3.281")
                .stats(avg_height_feet=functions.avg("`height * 3.281`"))
            )
        )ro   )r2   re   rn   s      r   evalzESQLBase.eval  s"    0 D47444m444r   fork1fork2fork3fork4fork5fork6fork7fork8rS   c	                 v    |                                  rt          d          t          | ||||||||	  	        S )aT  The ``FORK`` processing command creates multiple execution branches to operate on the
        same input data and combines the results in a single output table.

        :param fork<n>: Up to 8 execution branches, created with the ``ESQL.branch()`` method.

        Examples::

            query = (
                ESQL.from_("employees")
                .fork(
                    ESQL.branch().where("emp_no == 10001"),
                    ESQL.branch().where("emp_no == 10002"),
                )
                .keep("emp_no", "_fork")
                .sort("emp_no")
            )
        za query can only have one fork)rU   
ValueErrorrS   )	r2   rr   rs   rt   ru   rv   rw   rx   ry   s	            r   forkzESQLBase.fork  sC    8 ?? 	?=>>>D%ueUE5QQQr   Grokc                 $    t          | ||          S )a  ``GROK`` enables you to extract structured data out of a string.

        :param input: The column that contains the string you want to structure. If the
                      column has multiple values, ``GROK`` will process each value.
        :param pattern: A grok pattern. If a field name conflicts with an existing column,
                        the existing column is discarded. If a field name is used more than
                        once, a multi-valued column will be created with one value per each
                        occurrence of the field name.

        Examples::

            query1 = (
                ESQL.row(a="2023-01-23T12:15:00.000Z 127.0.0.1 some.email@foo.com 42")
                .grok("a", "%{TIMESTAMP_ISO8601:date} %{IP:ip} %{EMAILADDRESS:email} %{NUMBER:num}")
                .keep("date", "ip", "email", "num")
            )
            query2 = (
                ESQL.row(a="2023-01-23T12:15:00.000Z 127.0.0.1 some.email@foo.com 42")
                .grok(
                    "a",
                    "%{TIMESTAMP_ISO8601:date} %{IP:ip} %{EMAILADDRESS:email} %{NUMBER:num:int}",
                )
                .keep("date", "ip", "email", "num")
                .eval(date=functions.to_datetime("date"))
            )
            query3 = (
                ESQL.from_("addresses")
                .keep("city.name", "zip_code")
                .grok("zip_code", "%{WORD:zip_parts} %{WORD:zip_parts}")
            )
        )r}   rc   s      r   grokzESQLBase.grok<  s    @ D%)))r   Keepc                     t          | g|R  S )a  The ``KEEP`` processing command enables you to specify what columns are returned
        and the order in which they are returned.

        :param columns: The columns to keep, given as positional arguments. Supports
                        wildcards.

        Examples::

            query1 = ESQL.from_("employees").keep("emp_no", "first_name", "last_name", "height")
            query2 = ESQL.from_("employees").keep("h*")
            query3 = ESQL.from_("employees").keep("h*", "*")
        )r   rh   s     r   keepzESQLBase.keep^  s     D#7####r   max_number_of_rowsLimitc                 "    t          | |          S )av  The ``LIMIT`` processing command enables you to limit the number of rows that are
        returned.

        :param max_number_of_rows: The maximum number of rows to return.

        Examples::

            query1 = ESQL.from_("employees").sort("emp_no ASC").limit(5)
            query2 = ESQL.from_("index").stats(functions.avg("field1")).by("field2").limit(20000)
        )r   )r2   r   s     r   limitzESQLBase.limitm  s     T-...r   lookup_index
LookupJoinc                 "    t          | |          S )a#  `LOOKUP JOIN` enables you to add data from another index, AKA a 'lookup' index,
        to your ES|QL query results, simplifying data enrichment and analysis workflows.

        :param lookup_index: The name of the lookup index. This must be a specific index
                             name - wildcards, aliases, and remote cluster references are
                             not supported. Indices used for lookups must be configured
                             with the lookup index mode.

        Examples::

            query1 = (
                ESQL.from_("firewall_logs")
                .lookup_join("threat_list").on("source.IP")
                .where("threat_level IS NOT NULL")
            )
            query2 = (
                ESQL.from_("system_metrics")
                .lookup_join("host_inventory").on("host.name")
                .lookup_join("ownerships").on("host.name")
            )
            query3 = (
                ESQL.from_("app_logs")
                .lookup_join("service_owners").on("service_id")
            )
            query4 = (
                ESQL.from_("employees")
                .eval(language_code="languages")
                .where("emp_no >= 10091 AND emp_no < 10094")
                .lookup_join("languages_lookup").on("language_code")
            )
        )r   )r2   r   s     r   lookup_joinzESQLBase.lookup_joinz  s    @ $---r   columnMvExpandc                 "    t          | |          S )a  The `MV_EXPAND` processing command expands multivalued columns into one row per
        value, duplicating other columns.

        :param column: The multivalued column to expand.

        Examples::

            query = ESQL.row(a=[1, 2, 3], b="b", j=["a", "b"]).mv_expand("a")
        )r   )r2   r   s     r   	mv_expandzESQLBase.mv_expand  s     f%%%r   Renamec                     t          | fi |S )a}  The ``RENAME`` processing command renames one or more columns.

        :param columns: The old and new column name pairs, given as keyword arguments.
                        If a name conflicts with an existing column name, the existing column
                        is dropped. If multiple columns are renamed to the same name, all but
                        the rightmost column with the same new name are dropped.

        Examples::

            query = (
                ESQL.from_("employees")
                .keep("first_name", "last_name", "still_hired")
                .rename(still_hired="employed")
            )
        )r   rh   s     r   renamezESQLBase.rename  s      d&&g&&&r   probabilitySamplec                 "    t          | |          S )a?  The ``SAMPLE`` command samples a fraction of the table rows.

        :param probability: The probability that a row is included in the sample. The value
                            must be between 0 and 1, exclusive.

        Examples::

            query = ESQL.from_("employees").keep("emp_no").sample(0.05)
        )r   )r2   r   s     r   samplezESQLBase.sample  s     dK(((r   Sortc                     t          | g|R  S )ae  The ``SORT`` processing command sorts a table on one or more columns.

        :param columns: The columns to sort on.

        Examples::

            query1 = (
                ESQL.from_("employees")
                .keep("first_name", "last_name", "height")
                .sort("height")
            )
            query2 =  (
                ESQL.from_("employees")
                .keep("first_name", "last_name", "height")
                .sort("height DESC")
            )
            query3 = (
                ESQL.from_("employees")
                .keep("first_name", "last_name", "height")
                .sort("height DESC", "first_name ASC")
            )
            query4 = (
                ESQL.from_("employees")
                .keep("first_name", "last_name", "height")
                .sort("first_name ASC NULLS FIRST")
            )
        )r   rh   s     r   sortzESQLBase.sort  s    8 D#7####r   expressionsnamed_expressionsStatsc                 "    t          | g|R i |S )a6	  The ``STATS`` processing command groups rows according to a common value and
        calculates one or more aggregated values over the grouped rows.

        :param expressions: A list of expressions, given as positional arguments.
        :param named_expressions: A list of expressions, given as keyword arguments. The
                                  argument names are used for the returned aggregated values.

        Note that only one of `expressions` and `named_expressions` must be provided.

        Examples::

            query1 = (
                ESQL.from_("employees")
                .stats(count=functions.count("emp_no")).by("languages")
                .sort("languages")
            )
            query2 = (
                ESQL.from_("employees")
                .stats(avg_lang=functions.avg("languages"))
            )
            query3 = (
                ESQL.from_("employees")
                .stats(
                    avg_lang=functions.avg("languages"),
                    max_lang=functions.max("languages")
                )
            )
            query4 = (
                ESQL.from_("employees")
                .stats(
                    avg50s=functions.avg("salary").where('birth_date < "1960-01-01"'),
                    avg60s=functions.avg("salary").where('birth_date >= "1960-01-01"'),
                ).by("gender")
                .sort("gender")
            )
            query5 = (
                ESQL.from_("employees")
                .eval(Ks="salary / 1000")
                .stats(
                    under_40K=functions.count("*").where("Ks < 40"),
                    inbetween=functions.count("*").where("40 <= Ks AND Ks < 60"),
                    over_60K=functions.count("*").where("60 <= Ks"),
                    total=f.count("*")
                )
            )
            query6 = (
                ESQL.row(i=1, a=["a", "b"])
                .stats(functions.min("i")).by("a")
                .sort("a ASC")
            )
            query7 = (
                ESQL.from_("employees")
                .eval(hired=functions.date_format("hire_date", "yyyy"))
                .stats(avg_salary=functions.avg("salary")).by("hired", "languages.long")
                .eval(avg_salary=functions.round("avg_salary"))
                .sort("hired", "languages.long")

            )
        )r   )r2   r   r   s      r   statszESQLBase.stats  s$    | T=K===+<===r   Wherec                     t          | g|R  S )an  The ``WHERE`` processing command produces a table that contains all the rows
        from the input table for which the provided condition evaluates to `true`.

        :param expressions: A list of boolean expressions, given as positional arguments.
                            These expressions are combined with an ``AND`` logical operator.

        Examples::

            query1 = (
                ESQL.from_("employees")
                .keep("first_name", "last_name", "still_hired")
                .where("still_hired == true")
            )
            query2 = (
                ESQL.from_("sample_data")
                .where("@timestamp > NOW() - 1 hour")
            )
            query3 = (
                ESQL.from_("employees")
                .keep("first_name", "last_name", "height")
                .where("LENGTH(first_name) < 4")
            )
        )r   )r2   r   s     r   wherezESQLBase.where$  s    0 T(K((((r   r0   )FNNNNNNN)'r$   r%   r&   r'   r   r3   r+   r7   r5   r   r:   r(   r)   rA   	FieldTypeboolrK   r*   rQ   rU   rY   r^   rd   ri   rm   rq   r|   r   r   intr   r   r   r   floatr   r   r   r   r   r   r   r-   r-   _   s_         x
3    #    $ $ $ $ $
 #    ^ NY N3 N N N \N  y $ 3    \ 
> 
c 
 
 
 \
D    () ( ( ( ( ($)9%)97E)9	)9 )9 )9 )9V-Y - - - - - -(
$Y 
$6 
$ 
$ 
$ 
$$S $X $ $ $ $(5^ 5n 5QW 5 5 5 5: '+&*&*&*&*&*&*R RR 
#R 
#	R
 
#R 
#R 
#R 
#R 
#R 
R R R R@ *)  *c  *f  *  *  *  *D$Y $6 $ $ $ $/ / / / / / .	  .l  .  .  .  .D
&	 
&j 
& 
& 
& 
&'	 'h ' ' ' '$
)% 
)H 
) 
) 
) 
)$^ $ $ $ $ $<>>*>>AO>>	>> >> >> >>@). )W ) ) ) ) ) )r   r-   c                   D     e Zd ZdZdef fdZdedd fdZdefdZ	 xZ
S )r   zImplementation of the ``FROM`` source command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r   c                 |    t                                                       || _        t                      | _        d S r0   )superr3   _indicestuple_metadata_fields)r2   r   rT   s     r   r3   zFrom.__init__G  s2    7<wwr   fieldsr   c                     || _         | S )zContinuation of the ``FROM`` source command.

        :param fields: metadata fields to retrieve, given as positional arguments.
        )r   )r2   r   s     r   metadatazFrom.metadataL  s    
 !'r   c                       fd j         D             } j        j                                         dd                    |           } j        r,|dd                     fd j        D                        z   }|S )Nc                 :    g | ]}                     |          S r   )rA   ).0r<   r2   s     r   
<listcomp>z)From._render_internal.<locals>.<listcomp>U  s'    HHH4%%e,,HHHr    , z
 METADATA c                 :    g | ]}                     |          S r   rK   r   fieldr2   s     r   r   z)From._render_internal.<locals>.<listcomp>Z  s%    )d)d)dU$//%*@*@)d)d)dr   )r   rT   r$   upperjoinr   )r2   r   rJ   s   `  r   r:   zFrom._render_internalT  s    HHHH$-HHH~&,,..EE71C1CEE  	gtyy)d)d)d)ddNc)d)d)deeggh  r   )r$   r%   r&   r'   r)   r3   r   r   r+   r:   __classcell__rT   s   @r   r   r   ?  s         ? ? ? ? ? ? ?
	 f    #        r   r   c                   4     e Zd ZdZdef fdZdefdZ xZS )r   zImplementation of the ``ROW`` source command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r   c                      t                                                        fd|                                D              _        d S )Nc                     i | ]W\  }}                     |          t          |t                    st          j        |          n                    |          XS r   )rK   rN   r   rO   rP   rQ   )r   kvr2   s      r   
<dictcomp>z Row.__init__.<locals>.<dictcomp>i  sk     
 
 
 1 OOA!!%;<<*
1&&q))	
 
 
r   )r   r3   items_params)r2   r   rT   s   ` r   r3   zRow.__init__g  sR    
 
 
 
 
 
 
r   r   c                 t    dd                     d | j                                        D                       z   S )NzROW r   c                 "    g | ]\  }}| d | S  = r   )r   r   r   s      r   r   z(Row._render_internal.<locals>.<listcomp>s  s&    "Q"Q"QDAqa<<A<<"Q"Q"Qr   )r   r   r   r6   s    r   r:   zRow._render_internalr  s6    		"Q"QDL<N<N<P<P"Q"Q"QRRRRr   )	r$   r%   r&   r'   r*   r3   r+   r:   r   r   s   @r   r   r   _  sr         	
 	
 	
 	
 	
 	
 	
S# S S S S S S S Sr   r   c                   4     e Zd ZdZdef fdZdefdZ xZS )r   zImplementation of the ``SHOW`` source command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    which makes it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r   c                 V    t                                                       || _        d S r0   )r   r3   _item)r2   r   rT   s     r   r3   zShow.__init__~  s$    


r   r   c                 <    d|                      | j                   S )NzSHOW )rK   r   r6   s    r   r:   zShow._render_internal  s    4ttz22444r   )r$   r%   r&   r'   r+   r3   r:   r   r   s   @r   r   r   v  si         S      5# 5 5 5 5 5 5 5 5r   r   c                       e Zd ZdZdefdZdS )r!   a  Implementation of a branch inside a ``FORK`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    which makes it possible to chain all the commands that belong to the branch
    in a single expression.
    r   c                     dS )Nr9   r   r6   s    r   r:   zBranch._render_internal  s    rr   N)r$   r%   r&   r'   r+   r:   r   r   r   r!   r!     s9         #      r   r!   c                   \     e Zd ZdZdedef fdZdedd fdZded	edd fd
Z	defdZ
 xZS )rW   zImplementation of the ``CHANGE POINT`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   rV   c                     t                                          |           || _        d | _        d | _        d | _        d S r0   )r   r3   _value_key
_type_name_pvalue_name)r2   r.   rV   rT   s      r   r3   zChangePoint.__init__  s>       )-	)-+/r   keyr   c                     || _         | S )zContinuation of the `CHANGE_POINT` command.

        :param key: The column with the key to order the values by. If not specified,
                    `@timestamp` is used.
        )r   )r2   r   s     r   onzChangePoint.on  s     	r   	type_namepvalue_namec                 "    || _         || _        | S )a  Continuation of the `CHANGE_POINT` command.

        :param type_name: The name of the output column with the change point type.
                          If not specified, `type` is used.
        :param pvalue_name: The name of the output column with the p-value that indicates
                            how extreme the change point is. If not specified, `pvalue` is used.
        )r   r   )r2   r   r   s      r   as_zChangePoint.as_  s     $'r   c                    | j         sdnd|                     | j                    }| j        s	| j        sdn;d|                     | j        pd           d|                     | j        pd           }d| j         | | S )Nr9    ON  AS typer   pvaluezCHANGE_POINT )r   rK   r   r   r   )r2   r   namess      r   r:   zChangePoint._render_internal  s    	Jbb'Jdoodi.H.H'J'J ?w+/+<wBBv(A6BBvvdooVZVgVsksFtFtvv 	
 9t{8C8888r   )r$   r%   r&   r'   r-   r   r3   r   r+   r   r:   r   r   s   @r   rW   rW     s         0x 0	 0 0 0 0 0 0i M    
S 
s 
} 
 
 
 
9# 9 9 9 9 9 9 9 9r   rW   c                   L     e Zd ZdZdededef fdZdedd fdZdefd	Z	 xZ
S )
r\   zImplementation of the ``COMPLETION`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   rZ   r[   c                     t          |          t          |          z   dk    rt          d          t                                          |           || _        || _        d | _        d S )N   zGthis method requires either one positional or one keyword argument only)lenr{   r   r3   _prompt_named_prompt_inference_id)r2   r.   rZ   r[   rT   s       r   r3   zCompletion.__init__  so     v;;\***Q..Y   	   ),0r   inference_idr   c                     || _         | S )a	  Continuation of the `COMPLETION` command.

        :param inference_id: The ID of the inference endpoint to use for the task. The
                             inference endpoint must be configured with the completion
                             task type.
        )r   )r2   r   s     r   with_zCompletion.with_  s     *r   c                    | j         t          d          d| j         i}| j        rt          | j                                                  d         }t          | j                                                  d         }d|                     |           d|                     |           dt          j        |           S d|                     | j	        d                    dt          j        |           S )Nz/The completion command requires an inference IDr   r   zCOMPLETION r    WITH )
r   r{   r   listkeysvaluesrK   rO   rP   r   )r2   r   r   rZ   s       r   r:   zCompletion._render_internal  s    %NOOO!34 	]$,113344Q7F$,335566q9Fo!8!8ooT__V=T=Too\`\fgl\m\mooo\a!A!A\\TYIZIZ\\\r   )r$   r%   r&   r'   r-   r*   r3   r+   r   r:   r   r   s   @r   r\   r\     s         
1
1)7
1IW
1 
1 
1 
1 
1 
1# ,    	]# 	] 	] 	] 	] 	] 	] 	] 	]r   r\   c                   L     e Zd ZdZdededef fdZdedd fdZdefd	Z	 xZ
S )
ra   zImplementation of the ``DISSECT`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   r_   r`   c                 t    t                                          |           || _        || _        d | _        d S r0   )r   r3   _input_pattern
_separatorr2   r.   r_   r`   rT   s       r   r3   zDissect.__init__  s4       )-r   	separatorr   c                     || _         | S )zContinuation of the ``DISSECT`` command.

        :param separator: A string used as the separator between appended values,
                          when using the append modifier.
        )r   )r2   r   s     r   append_separatorzDissect.append_separator  s     $r   c                     | j         dndt          j        | j                    }d|                     | j                   dt          j        | j                   | S )Nr9   z APPEND_SEPARATOR=zDISSECT r   )r   rO   rP   rK   r   r   )r2   seps     r   r:   zDissect._render_internal  sj     & BCdj&A&ACC 	 Wtt{33VVdj6O6OVQTVV	
r   )r$   r%   r&   r'   r-   r   r+   r3   r   r:   r   r   s   @r   ra   ra     s         .x .	 .C . . . . . .# )    
# 
 
 
 
 
 
 
 
r   ra   c                   8     e Zd ZdZdedef fdZdefdZ xZ	S )rf   zImplementation of the ``DROP`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   re   c                 X    t                                          |           || _        d S r0   r   r3   _columnsr2   r.   re   rT   s      r   r3   zDrop.__init__  &       r   r   c                 V     dd                      fd j        D                        S )NzDROP r   c                 >    g | ]}                     |d           S T)rC   r   r   colr2   s     r   r   z)Drop._render_internal.<locals>.<listcomp>  s*    !e!e!ePS$//#d/"K"K!e!e!er   r   r   r6   s   `r   r:   zDrop._render_internal  s6    htyy!e!e!e!eW[Wd!e!e!effhhhr   
r$   r%   r&   r'   r-   r   r3   r+   r:   r   r   s   @r   rf   rf     sy          x  9            i# i i i i i i i ir   rf   c                   \     e Zd ZdZdedef fdZdedd fdZded	edd fd
Z	defdZ
 xZS )rk   zImplementation of the ``ENRICH`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   rj   c                     t                                          |           || _        d | _        d | _        d | _        d S r0   )r   r3   _policy_match_field_fields_named_fields)r2   r.   rj   rT   s      r   r3   zEnrich.__init__$  s?       158<=Ar   match_fieldr   c                     || _         | S )aw  Continuation of the ``ENRICH`` command.

        :param match_field: The match field. ``ENRICH`` uses its value to look for records
                            in the enrich index. If not specified, the match will be
                            performed on the column with the same name as the
                            `match_field` defined in the enrich policy.
        )r  )r2   r  s     r   r   z	Enrich.on+  s     (r   r   named_fieldsc                 H    |r|rt          d          || _        || _        | S )a`  Continuation of the ``ENRICH`` command.

        :param fields: The enrich fields from the enrich index that are added to the result
                       as new columns, given as positional arguments. If a column with the
                       same name as the enrich field already exists, the existing column will
                       be replaced by the new column. If not specified, each of the enrich
                       fields defined in the policy is added. A column with the same name as
                       the enrich field will be dropped unless the enrich field is renamed.
        :param named_fields: The enrich fields from the enrich index that are added to the
                             result as new columns, given as keyword arguments. The name of
                             the keyword arguments are used as column names. If a column has
                             the same name as the new name, it will be discarded. If a name
                             (new or original) occurs more than once, only the rightmost
                             duplicate creates a new column.
        Athis method supports positional or keyword arguments but not both)r{   r  r  )r2   r   r  s      r   r   zEnrich.with_6  s>       	l 	S   )r   c                 V     j         dnd                      j                    }d} j        r<dd                     fd j                                        D                        }n0 j        )dd                     fd j        D                        }d j         | | S )Nr9   r   r   r   c                 p    g | ]2\  }}                     |           d                      |           3S r   r   )r   namer   r2   s      r   r   z+Enrich._render_internal.<locals>.<listcomp>V  sY      (M  (M  (Mbmbfhm4??4+@+@(](]T__UZE[E[(](]  (M  (M  (Mr   c                 :    g | ]}                     |          S r   r   r   s     r   r   z+Enrich._render_internal.<locals>.<listcomp>Y  s%    #U#U#UuDOOE$:$:#U#U#Ur   zENRICH )r  rK   r  r   r   r  r  )r2   r   r   s   `  r   r:   zEnrich._render_internalN  s     ( B<(9::<< 	
  	 PTYY  (M  (M  (M  (Mqu  rD  rJ  rJ  rL  rL  (M  (M  (M  N  N  P  PEE\%X#U#U#U#U#U#U#UVVXX  32r25222r   )r$   r%   r&   r'   r-   r+   r3   r   r   r   r:   r   r   s   @r   rk   rk     s         Bx B B B B B B B	i 	H 	 	 	 	Y 	 h    03# 3 3 3 3 3 3 3 3r   rk   c                   <     e Zd ZdZdededef fdZdefdZ xZ	S )ro   zImplementation of the ``EVAL`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   re   rn   c                     |r|rt          d          t                                          |           |p|| _        d S Nr  )r{   r   r3   r   )r2   r.   re   rn   rT   s       r   r3   zEval.__init__f  sS      	} 	S   	   0=r   r   c                      t           j        t                    r9d                     fd j                                        D                       }n&d                     fd j        D                       }d| S )Nr   c                 p    g | ]2\  }}                     |           d                     |           3S r   rK   rQ   )r   r  rV   r2   s      r   r   z)Eval._render_internal.<locals>.<listcomp>v  sU       #e t,,KK1B1B51I1IKK  r   c                 <    g | ]}                     |           S r   rQ   r  s     r   r   z)Eval._render_internal.<locals>.<listcomp>|  s*    SSSc!2!23!7!79SSSr   zEVAL )rN   r   dictr   r   )r2   colss   ` r   r:   zEval._render_internals  s    dmT** 	U99   '+}':':'<'<   DD 99SSSST]SSSTTDt~~r   
r$   r%   r&   r'   r-   r*   r3   r+   r:   r   r   s   @r   ro   ro   ^  s~         11 !1 (	1 1 1 1 1 1
# 
 
 
 
 
 
 
 
r   ro   c                        e Zd ZdZ	 	 	 	 	 	 	 ddededee         dee         dee         dee         d	ee         d
ee         dee         f fdZdefdZ xZ	S )rS   zImplementation of the ``FORK`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    Nr.   rr   rs   rt   ru   rv   rw   rx   ry   c
                 h    t                                          |           ||||||||	g| _        d S r0   )r   r3   	_branches)r2   r.   rr   rs   rt   ru   rv   rw   rx   ry   rT   s             r   r3   zFork.__init__  s9     	   ueUE5Qr   r   c                     d}| j         D ]J}|rF|                                dd                              dd          }|dk    rd| d}A|d| dz  }Kd| S )	Nr9      
r   z( z )z

       ( zFORK )r%  r5   rI   )r2   cmdsr#   cmds       r   r:   zFork._render_internal  s    n 	2 	2F 2mmooabb)11$<<2::'<<<DD1#1111Dt~~r   r   )
r$   r%   r&   r'   r-   r   r3   r+   r:   r   r   s   @r   rS   rS     s	         %)$($($($($($(R RR R !	R
 !R !R !R !R !R !R R R R R R	# 	 	 	 	 	 	 	 	r   rS   c                   <     e Zd ZdZdededef fdZdefdZ xZ	S )r}   zImplementation of the ``GROK`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   r_   r`   c                 f    t                                          |           || _        || _        d S r0   )r   r3   r   r   r   s       r   r3   zGrok.__init__  s-       r   r   c                 p    d|                      | j                   dt          j        | j                   S )NzGROK r   )rK   r   rO   rP   r   r6   s    r   r:   zGrok._render_internal  s2    Qtt{33QQdj6O6OQQQr   )
r$   r%   r&   r'   r-   r   r+   r3   r:   r   r   s   @r   r}   r}     s          x  	  C            
R# R R R R R R R Rr   r}   c                   8     e Zd ZdZdedef fdZdefdZ xZ	S )r   zImplementation of the ``KEEP`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   re   c                 X    t                                          |           || _        d S r0   r   r   s      r   r3   zKeep.__init__  r  r   r   c                 V     dd                      fd j        D                        S )NzKEEP r   c                 @    g | ]}                     |d            S r  r   r  s     r   r   z)Keep._render_internal.<locals>.<listcomp>  s-    !j!j!jUXT__S_%N%N"P!j!j!jr   r  r6   s   `r   r:   zKeep._render_internal  s6    mtyy!j!j!j!j\`\i!j!j!jkkmmmr   r  r   s   @r   r   r     sy          x  9            n# n n n n n n n nr   r   c                   8     e Zd ZdZdedef fdZdefdZ xZ	S )r   zImplementation of the ``LIMIT`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   r   c                 X    t                                          |           || _        d S r0   )r   r3   _max_number_of_rows)r2   r.   r   rT   s      r   r3   zLimit.__init__  s)       #5   r   r   c                 :    dt          j        | j                   S )NzLIMIT )rO   rP   r4  r6   s    r   r:   zLimit._render_internal  s    >
4#;<<>>>r   )
r$   r%   r&   r'   r-   r   r3   r+   r:   r   r   s   @r   r   r     sp         6x 6S 6 6 6 6 6 6?# ? ? ? ? ? ? ? ?r   r   c                   H     e Zd ZdZdedef fdZdedd fdZde	fdZ
 xZS )	r   zImplementation of the ``LOOKUP JOIN`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   r   c                 f    t                                          |           || _        d | _        d S r0   )r   r3   _lookup_index_field)r2   r.   r   rT   s      r   r3   zLookupJoin.__init__  s.       )+/r   r   r   c                     || _         | S )a{  Continuation of the `LOOKUP_JOIN` command.

        :param field: The field to join on. This field must exist in both your current query
                      results and in the lookup index. If the field contains multi-valued
                      entries, those entries will not match anything (the added fields will
                      contain null for those rows).
        )r9  )r2   r   s     r   r   zLookupJoin.on  s     r   c                     | j         t          d          t          | j        t                    r| j        n| j        j        j        }d|                     |           d|                     | j                    S )Nz!Joins require a field to join on.zLOOKUP JOIN r   )	r9  r{   rN   r8  r+   r>   r@   rA   rK   )r2   r<   s     r   r:   zLookupJoin._render_internal  s    ;@AAA $,c221D#*0 	 Y4--e44XX$//$+:V:VXX	
r   )r$   r%   r&   r'   r-   r)   r3   r   r   r+   r:   r   r   s   @r   r   r     s         0x 0y 0 0 0 0 0 0
		 	l 	 	 	 	

# 

 

 

 

 

 

 

 

r   r   c                   8     e Zd ZdZdedef fdZdefdZ xZ	S )r   zImplementation of the ``MV_EXPAND`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   r   c                 X    t                                          |           || _        d S r0   )r   r3   _column)r2   r.   r   rT   s      r   r3   zMvExpand.__init__  s&       r   r   c                 <    d|                      | j                   S )Nz
MV_EXPAND )rK   r>  r6   s    r   r:   zMvExpand._render_internal  s    ;DOODL99;;;r   r  r   s   @r   r   r     sp         x       <# < < < < < < < <r   r   c                   8     e Zd ZdZdedef fdZdefdZ xZ	S )r   zImplementation of the ``RENAME`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   re   c                 X    t                                          |           || _        d S r0   r   r   s      r   r3   zRename.__init__  r  r   r   c                 z     dd                      fd j                                        D                        S )NzRENAME r   c                 p    g | ]2\  }}                     |           d                      |           3S )r   r   )r   old_namenew_namer2   s      r   r   z+Rename._render_internal.<locals>.<listcomp>  sY      $S  $S  $Sfxfnpxtx'@'@$a$adooV^F_F_$a$a  $S  $S  $Sr   )r   r   r   r6   s   `r   r:   zRename._render_internal  s     V  $S  $S  $S  $S  }A  }J  }P  }P  }R  }R  $S  $S  $S  T  T  V  V  	Vr   r  r   s   @r   r   r   	  sy          x  I            V# V V V V V V V Vr   r   c                   8     e Zd ZdZdedef fdZdefdZ xZ	S )r   zImplementation of the ``SAMPLE`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   r   c                 X    t                                          |           || _        d S r0   )r   r3   _probability)r2   r.   r   rT   s      r   r3   zSample.__init__!  )       'r   r   c                 :    dt          j        | j                   S )NzSAMPLE )rO   rP   rH  r6   s    r   r:   zSample._render_internal%  s    8D$566888r   )
r$   r%   r&   r'   r-   r   r3   r+   r:   r   r   s   @r   r   r     sp         (x (e ( ( ( ( ( (9# 9 9 9 9 9 9 9 9r   r   c                   8     e Zd ZdZdedef fdZdefdZ xZ	S )r   zImplementation of the ``SORT`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   re   c                 X    t                                          |           || _        d S r0   r   r   s      r   r3   zSort.__init__1  r  r   r   c                 n      fd j         D             }dd                    d |D                        S )Nc                     g | ]C}d                      fdt          |                              d           D                       DS )r   c                 :    g | ]}                     |          S r   r   )r   termr2   s     r   r   z4Sort._render_internal.<locals>.<listcomp>.<listcomp>7  s%    LLLdood++LLLr   )r   r+   splitr  s     r   r   z)Sort._render_internal.<locals>.<listcomp>6  s\     
 
 
 HHLLLLCs8K8KLLLMM
 
 
r   zSORT r   c                     g | ]}| S r   r   )r   r   s     r   r   z)Sort._render_internal.<locals>.<listcomp>:  s    !>!>!>T)!>!>!>r   )r   r   )r2   sortss   ` r   r:   zSort._render_internal5  sY    
 
 
 
}
 
 
 Btyy!>!>!>!>!>??AAAr   r"  r   s   @r   r   r   )  sy          x  >            B# B B B B B B B Br   r   c                   L     e Zd ZdZdededef fdZdedd fdZdefd	Z	 xZ
S )
r   zImplementation of the ``STATS`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   r   r   c                     |r|rt          d          t                                          |           |p|| _        d | _        d S r  )r{   r   r3   _expressions_grouping_expressions)r2   r.   r   r   rT   s       r   r3   zStats.__init__E  s`      	, 	S   	   '<+<KO"""r   grouping_expressionsr   c                     || _         | S r0   )rW  )r2   rX  s     r   byzStats.byS  s    %9"r   c                 Z    t           j        t                    r& fd j                                        D             }n fd j        D             }d} j        dn(dd                     fd j        D                        }d|                    d	 |D                        | S )
Nc                 p    g | ]2\  }}                     |           d                     |           3S r   r  )r   r   rV   r2   s      r   r   z*Stats._render_internal.<locals>.<listcomp>Y  sU       C ??3''FFD,=,=e,D,DFF  r   c                 <    g | ]}                     |           S r   r  r   rL   r2   s     r   r   z*Stats._render_internal.<locals>.<listcomp>^  s*    PPPd))$//1PPPr   z
,
        r9   z
        BY r   c                 <    g | ]}                     |           S r   r  r^  s     r   r   z*Stats._render_internal.<locals>.<listcomp>c  s*    +p+p+pTt/@/@/F/F,H+p+p+pr   zSTATS c                     g | ]}| S r   r   r   rL   s     r   r   z*Stats._render_internal.<locals>.<listcomp>e  s    2O2O2Od92O2O2Or   )rN   rV  r   r   rW  r   )r2   exprsexpression_separatorrZ  s   `   r   r:   zStats._render_internalW  s    d'.. 	Q   "&"3"9"9";";  EE
 QPPPd>OPPPE, )1 Bs+p+p+p+pUYUo+p+p+p!q!qss 	
 W,112O2O2O2O2OPPVRTVVVr   )r$   r%   r&   r'   r-   r*   r3   rZ  r+   r:   r   r   s   @r   r   r   =  s         PP %P ,	P P P P P P 7    W# W W W W W W W Wr   r   c                   8     e Zd ZdZdedef fdZdefdZ xZ	S )r   zImplementation of the ``WHERE`` processing command.

    This class inherits from :class:`ESQLBase <elasticsearch.esql.esql.ESQLBase>`,
    to make it possible to chain all the commands that belong to an ES|QL query
    in a single expression.
    r.   r   c                 X    t                                          |           || _        d S r0   )r   r3   rV  )r2   r.   r   rT   s      r   r3   zWhere.__init__p  rI  r   r   c                 V     dd                      fd j        D                        S )NzWHERE  AND c                 <    g | ]}                     |           S r   r  r^  s     r   r   z*Where._render_internal.<locals>.<listcomp>u  s*    %a%a%at):):4)@)@&B%a%a%ar   )r   rV  r6   s   `r   r:   zWhere._render_internalt  s5    d%a%a%a%atO`%a%a%abbdddr   r"  r   s   @r   r   r   h  sy         (x (~ ( ( ( ( ( (e# e e e e e e e er   r   r   r   r   c                  Z    t          d                    d | D                                 S )z6Combine two or more expressions with the AND operator.rg  c                     g | ]}d | d	S ()r   ra  s     r   r   zand_.<locals>.<listcomp>z  s     /T/T/TD/T/T/Tr   r   r   r   s    r   and_rp  x  s+    !',,/T/T/T/T/T"U"UVVVr   c                  Z    t          d                    d | D                                 S )z5Combine two or more expressions with the OR operator.z OR c                     g | ]}d | d	S rk  r   ra  s     r   r   zor_.<locals>.<listcomp>  s     .S.S.St{4{{{.S.S.Sr   rn  ro  s    r   or_rs  }  s+    !&++.S.S{.S.S.S"T"TUUUr   
expressionc                 (    t          d|  d          S )zNegate an expression.zNOT (rm  )r   )rt  s    r   not_rv    s    !"7*"7"7"7888r   ).rO   rG   abcr   r   typingr   r   r   r   r	   r
   dsl.document_baser   r   r   r+   r   r)   r*   r   r-   r   r   r   r!   rW   r\   ra   rf   rk   ro   rS   r}   r   r   r   r   r   r   r   r   r   rp  rs  rv  r   r   r   <module>rz     sK  $  				 # # # # # # # # : : : : : : : : : : : : : : : : W W W W W W W W W W#S()	$|$c)*	> > > > >3 > > >B]) ]) ]) ]) ])s ]) ]) ])@    8   @S S S S S( S S S.5 5 5 5 58 5 5 5 	 	 	 	 	X 	 	 	+9 +9 +9 +9 +9( +9 +9 +9\'] '] '] '] '] '] '] ']T
 
 
 
 
h 
 
 
Di i i i i8 i i i ?3 ?3 ?3 ?3 ?3X ?3 ?3 ?3D    8   D         8      FR R R R R8 R R R"n n n n n8 n n n ? ? ? ? ?H ? ? ? "
 "
 "
 "
 "
 "
 "
 "
J< < < < <x < < < V V V V VX V V V 9 9 9 9 9X 9 9 9 B B B B B8 B B B((W (W (W (W (WH (W (W (WVe e e e eH e e e W- W2J W W W W
V, V1I V V V V
9+ 90H 9 9 9 9 9 9r   