§
    Ètºfƒ  ã            	       ó˜  — U d Z ddlmZmZ ddlmZmZmZmZm	Z	 ddl
mZmZ  e	d¦  «        Z e	d¦  «        Z e	d¦  «        Zded	ee         d
efd„Zdeegef         dee         d
ee         fd„Zdee         dee         d
efd„Zdeeegef         d
eeegef         fd„Zdeegef         deegef         d
eegef         fd„Z eej         e ee¦  «         ed¦  «        ¦  «        ¦  «        Zeee         ged         f         ed<   deegef         deg ee         f         d
efd„Zdeegef         d
eg ef         fd„ZdS )z1
General functional-style helpers for disttrial.
é    )ÚpartialÚwraps)Ú	AwaitableÚCallableÚIterableÚOptionalÚTypeVar)ÚDeferredÚsucceedÚ_AÚ_BÚ_CÚdefaultÚoptionalÚreturnc                 ó   — |€| S |S )zÂ
    Get a definite value from an optional value.

    @param default: The value to return if the optional value is missing.

    @param optional: The optional value to return if it exists.
    © )r   r   s     ú]/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/trial/_dist/functional.pyÚfromOptionalr      s   € ð ÐØˆØ€Oó    Ú	conditionÚxsc              #   ó8   K  — |D ]} | |¦  «        r|V — Œ dS dS )z†
    :return: An iterable over C{xs} that stops when C{condition} returns
        ``False`` based on the value of iterated C{xs}.
    Nr   )r   r   Úxs      r   Ú	takeWhiler      sC   è è € ð
 ð ð ˆØˆ9�Q‰<Œ<ð 	ØˆGˆGˆGˆGàˆEˆEð	ð r   ÚaÚbc              ƒ   ó&   K  — | ƒ d{V —† |ƒ d{V —†S )z³
    Wait for one action to complete and then another.

    If either action fails, failure is propagated.  If the first action fails,
    the second action is not waited on.
    Nr   )r   r   s     r   Úsequencer   +   s*   è è € ð €G€G€G€G€G€G€GØˆ7ˆ7ˆ7ˆ7ˆ7ˆ7€Nr   Úfc                 ó<   ‡ — t          ‰ ¦  «        ˆ fd„¦   «         }|S )zc
    Create a function like another but with the order of the first two
    arguments flipped.
    c                 ó   •—  ‰|| ¦  «        S ©Nr   )r   r   r    s     €r   Úgzflip.<locals>.g<   s   ø€ àˆq��A‰wŒwˆr   ©r   )r    r$   s   ` r   Úflipr&   6   s5   ø€ õ ˆ1�X„Xðð ð ð ñ „Xðð €Hr   ÚfxÚfyc                 ój   ‡ ‡— t          ‰ ¦  «        t          ‰¦  «        ˆ ˆfd„¦   «         ¦   «         }|S )z‰
    Create a function that calls one function with an argument and then
    another function with the result of the first function.
    c                 ó,   •—  ‰ ‰| ¦  «        ¦  «        S r#   r   )r   r'   r(   s    €€r   r$   zcompose.<locals>.gI   s   ø€ ð ˆr�"�"�Q‘%”%‰yŒyÐr   r%   )r'   r(   r$   s   `` r   Úcomposer+   C   sK   øø€ õ ˆ2�Y„YÝ
ˆ2�Y„Yðð ð ð ð ñ „Yñ „Yðð €Hr   NÚdiscardResultÚ	predicateÚactionc              ƒ   óD   K  — 	  |¦   «         ƒ d{V —†} | |¦  «        s|S Œ)zò
    Call a function repeatedly until its result fails to satisfy a predicate.

    @param predicate: The check to apply.

    @param action: The function to call.

    @return: The result of C{action} which did not satisfy C{predicate}.
    TNr   )r-   r.   Úresults      r   ÚiterateWhiler1   X   s>   è è € ðØ�v‘x”x������ˆØˆy˜Ñ Ô ð 	ØˆMðr   c                 ó*   ‡ ‡— dŠdt           fˆˆ fd„}|S )z’
    Wrap a function with another that automatically passes an integer counter
    of the number of calls that have gone through the wrapper.
    r   r   c                  ó@   •— 	  ‰‰¦  «        } ‰dz  Šn
# ‰dz  Šw xY w| S )Né   r   )r0   Úcounterr    s    €€r   r$   zcountingCalls.<locals>.gr   s6   ø€ ð	Ø�Q�w‘Z”ZˆFà�q‰LˆGˆGøˆG�q‰LˆGˆGˆGˆGˆGØˆs   ƒ ”)r   )r    r$   r5   s   ` @r   ÚcountingCallsr6   k   s<   øø€ ð
 €Gð�rð ð ð ð ð ð ð ð €Hr   )Ú__doc__Ú	functoolsr   r   Útypingr   r   r   r   r	   Útwisted.internet.deferr
   r   r   r   r   r   Úboolr   r   r&   r+   ÚfromCoroutiner,   Ú__annotations__r1   Úintr6   r   r   r   ú<module>r?      sœ  ððð ð ð %Ð $Ð $Ð $Ð $Ð $Ð $Ð $Ø CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ Cà 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4à€WˆT�]„]€Ø€WˆT�]„]€Ø€WˆT�]„]€ð
˜"ð 
¨°¬ð 
¸ð 
ð 
ð 
ð 
ð	˜ 2 $¨ *Ô-ð 	°8¸B´<ð 	ÀHÈRÄLð 	ð 	ð 	ð 	ð�i ”mð ¨	°"¬ð ¸"ð ð ð ð ð
ˆH�b˜"�X˜r�\Ô"ð 
 x°°R°¸"°Ô'=ð 
ð 
ð 
ð 
ð�˜"˜˜r˜Ô"ð ¨°"°°r°Ô(:ð ¸xÈÈÈbÈÔ?Qð ð ð ð ð <C¸7ØÔØ€GˆDˆD�‰NŒN˜G˜G D™MœMÑ*Ô*ñ<ô <€ˆx˜ 2œ˜¨°$¬Ð7Ô8ð ð ñ ðØ˜˜˜d˜
Ô#ðà�R˜ 2œÐ&Ô'ðð ðð ð ð ð&�X˜s˜e R˜iÔ(ð ¨X°b¸"°fÔ-=ð ð ð ð ð ð r   