ó
    Ö›‘hqk  ã                  óº  • S SK Jr  S SKrS SKrS SKrS SKrS SKJr   S SKr	S SK
r\	r\r
 S SKJrJr  \r\rS SKJr  S SKJrJrJrJrJrJrJrJrJr  S SKJr  S SKJr  \" \" S	S
SS 5      SSS5        \" S5      r  " S S\\!\ 4   5      r"S r#S5S jr$S r%S r&      S6S jr'S r(     S7S jr)S r*S r+S8S jr,S r-/ / 4S jr. " S S5      r/S  r0 " S! S"5      r1 " S# S$5      r2 " S% S&5      r3 " S' S(5      r4 S S)KJ5r6  \6r7\7c  S* r5OS+ r5S9S, jr8S- r9S. r:S/ r;S0 r<S1 r=S2 r>S3 r?/ S4Qr@g! \ a    Sr
Sr GNf = f! \ a    SrSr GNf = f! \ a    Sr7 NUf = f):é    )ÚannotationsN)ÚAnyStr)Ú	getgroupsÚ	setgroups)ÚOrderedDict)	ÚAnyÚCallableÚClassVarÚMappingÚMutableMappingÚSequenceÚTupleÚTypeVarÚUnion)ÚVersion)ÚdeprecatedModuleAttributeÚTwistedé   é   z$Use collections.OrderedDict instead.ztwisted.python.utilr   Ú_Tc                  óÞ   ^ • \ rS rSrSr SU 4S jjrS rS rS rS r	S r
\
rS	 rS
 rS rS rSS jrS rS rSS jrS r\rS rS r\" 5       r\4S jrS rS rS rS rSS jrSr U =r!$ )ÚInsensitiveDicté;   a  
Dictionary, that has case-insensitive keys.

Normally keys are retained in their original form when queried with
.keys() or .items().  If initialized with preserveCase=0, keys are both
looked up in lowercase and returned in lowercase by .keys() and .items().
c                ón   >• [         TU ]  5         0 U l        X l        U(       a  U R	                  U5        gg)z4
Create an empty dictionary, or update from 'dict'.
N)ÚsuperÚ__init__ÚdataÚpreserveÚupdate)ÚselfÚdictr   Ú	__class__s      €ÚWC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/python/util.pyr   ÚInsensitiveDict.__init__I   s0   ø€ ô 	‰ÑÔØˆŒ	Ø ŒÞØ�K‰K˜Õð ó    c                ó@   • U R                  U5      nU R                  U	 g ©N©Ú_lowerOrReturnr   ©r    ÚkeyÚks      r#   Ú__delitem__ÚInsensitiveDict.__delitem__S   s   € Ø×Ñ Ó$ˆØ�I‰I�a‰Lr%   c                óz   • [        U[        5      (       d  [        U[        5      (       a  UR                  5       $ U$ r'   )Ú
isinstanceÚbytesÚstrÚlower©r    r+   s     r#   r)   ÚInsensitiveDict._lowerOrReturnW   s,   € Ü�cœ5×!Ñ!¤Z°´S×%9Ñ%9Ø—9‘9“;ÐàˆJr%   c                óH   • U R                  U5      nU R                  U   S   $ )z9
Retrieve the value associated with 'key' (in any case).
é   r(   r*   s      r#   Ú__getitem__ÚInsensitiveDict.__getitem__]   s&   € ð ×Ñ Ó$ˆØ�y‰y˜‰|˜A‰Ðr%   c                óF   • U R                  U5      nX4U R                  U'   g)zd
Associate 'value' with 'key'. If 'key' already exists, but
in different case, it will be replaced.
Nr(   )r    r+   Úvaluer,   s       r#   Ú__setitem__ÚInsensitiveDict.__setitem__d   s#   € ð
 ×Ñ Ó$ˆØ�|ˆ�	‰	�!Šr%   c                ó@   • U R                  U5      nX R                  ;   $ )z-
Case insensitive test whether 'key' exists.
r(   r*   s      r#   Úhas_keyÚInsensitiveDict.has_keyl   s    € ð ×Ñ Ó$ˆØ—I‘I‰~Ðr%   c                óœ   • U R                   (       d:  [        U[        5      (       d  [        U[        5      (       a  UR	                  5       $ U$ r'   )r   r0   r1   r2   r3   r4   s     r#   Ú_doPreserveÚInsensitiveDict._doPreserveu   s2   € Ø�}�}¤*¨S´%×"8Ñ"8¼JÀsÌC×<PÑ<PØ—9‘9“;ÐàˆJr%   c                ó4   • [        U R                  5       5      $ )z&
List of keys in their original case.
)ÚlistÚiterkeys©r    s    r#   ÚkeysÚInsensitiveDict.keys{   s   € ô �D—M‘M“OÓ$Ð$r%   c                ó4   • [        U R                  5       5      $ )z
List of values.
)rE   Ú
itervaluesrG   s    r#   ÚvaluesÚInsensitiveDict.values�   s   € ô �D—O‘OÓ%Ó&Ð&r%   c                ó4   • [        U R                  5       5      $ )z
List of (key,value) pairs.
)rE   Ú	iteritemsrG   s    r#   ÚitemsÚInsensitiveDict.items‡   s   € ô �D—N‘NÓ$Ó%Ð%r%   c                ó0   •  X   $ ! [          a    Us $ f = f)zV
Retrieve value associated with 'key' or return default value
if 'key' doesn't exist.
)ÚKeyError©r    r+   Údefaults      r#   ÚgetÚInsensitiveDict.get�   s#   € ð
	Ø‘9ÐøÜó 	ØŠNð	ús   ‚ †”c                ó>   • U R                  U5      (       d  X U'   X   $ )zd
If 'key' doesn't exist, associate it with the 'default' value.
Return value associated with 'key'.
)r?   rT   s      r#   Ú
setdefaultÚInsensitiveDict.setdefault—   s"   € ð
 �|‰|˜C× Ñ Ø�‰IØ‰yÐr%   c                ó>   • UR                  5        H	  u  p#X0U'   M     g)z%
Copy (key,value) pairs from 'dict'.
N©rP   )r    r!   r,   Úvs       r#   r   ÚInsensitiveDict.update    s   € ð —J‘J–L‰DˆAØ�‹Gò !r%   c           	     óŽ   • SR                  U R                  5        VVs/ s H  u  pU< SU< 3PM     snn5      nSU-  $ s  snnf )z*
String representation of the dictionary.
z, z: zInsensitiveDict({%s}))ÚjoinrP   )r    r,   r]   rP   s       r#   Ú__repr__ÚInsensitiveDict.__repr__§   sD   € ð —	‘	¸¿¹¼ÔFº±°˜q™e 2 a¡U›O¹ÒFÓGˆØ&¨Ñ.Ð.ùó Gs   ŸA
c              #  óz   #   • U R                   R                  5        H  nU R                  US   5      v •  M     g 7f©Nr   ©r   rL   rB   ©r    r]   s     r#   rF   ÚInsensitiveDict.iterkeys®   s1   é € Ø—‘×!Ñ!Ö#ˆAØ×"Ñ" 1 Q¡4Ó(Ô(ò $ùs   ‚9;c              #  ó\   #   • U R                   R                  5        H
  nUS   v •  M     g 7f©Nr7   )r   rL   rf   s     r#   rK   ÚInsensitiveDict.itervalues´   s%   é € Ø—‘×!Ñ!Ö#ˆAØ�A‘$ŒJò $ùs   ‚*,c              #  ó|   #   • U R                   R                  5        H  u  pU R                  U5      U4v •  M     g 7fr'   re   )r    r,   r]   s      r#   rO   ÚInsensitiveDict.iteritems¸   s4   é € Ø—I‘I×$Ñ$Ö&‰DˆAØ×"Ñ" 1Ó% qÐ(Ô(ò 'ùs   ‚:<c                ó    •  U R                   R                  U R                  U5      5      S   $ ! [         a    X R                  L a  e Us $ f = f)z*
@see: L{dict.pop}
@since: Twisted 21.2.0
r7   )r   Úpopr)   rS   Ú	_notFoundrT   s      r#   rn   ÚInsensitiveDict.pop¾   sK   € ð
	Ø—9‘9—=‘= ×!4Ñ!4°SÓ!9Ó:¸1Ñ=Ð=øÜó 	ØŸ.™.Ò(ØØŠNð	ús   ‚,/ ¯AÁAc                ó6   • U R                  5       S   nXS   	 U$ rd   r\   )r    Úis     r#   ÚpopitemÚInsensitiveDict.popitemÊ   s   € Ø�J‰J‹L˜‰OˆØ�1‘ˆJØˆr%   c                ó6   • U R                  5        H  nX	 M     g r'   )rH   )r    r,   s     r#   ÚclearÚInsensitiveDict.clearÏ   s   € Ø—‘–ˆAØ’ò r%   c                ó,   • [        X R                  5      $ r'   )r   r   rG   s    r#   ÚcopyÚInsensitiveDict.copyÓ   s   € Ü˜t§]¡]Ó3Ð3r%   c                ó,   • [        U R                  5      $ r'   )Úlenr   rG   s    r#   Ú__len__ÚInsensitiveDict.__len__Ö   s   € Ü�4—9‘9‹~Ðr%   c                ó¶   • [        U[        5      (       a?  U R                  5        H  u  p#X!;  d
  X   U:w  d  M    g   [        U 5      [        U5      :H  $ [        $ )NF)r0   r   rP   r|   ÚNotImplemented)r    Úotherr,   r]   s       r#   Ú__eq__ÚInsensitiveDict.__eq__Ù   sL   € Ü�eœW×%Ñ%ØŸ
™
ž‘�Ø“> U¡X°¥]Ù ñ %ô �t“9¤ E£
Ñ*Ð*ä!Ð!r%   )r   r   ri   r'   ©Úreturnr2   ©r�   Úobjectr…   Úbool)"Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r-   r)   r8   r<   r?   Ú__contains__rB   rH   rL   rP   rV   rY   r   ra   rF   Ú__iter__rK   rO   r‡   ro   rn   rs   rv   ry   r}   r‚   Ú__static_attributes__Ú__classcell__)r"   s   @r#   r   r   ;   sŸ   ø† ñð÷
òòòò$òð €Lòò%ò'ò&ôòòô/ò)ð €Hòò)ñ “€Ià(ô 
òò
ò4ò÷"ò "r%   r   c                ó~   • [        5       n/ nU  H*  nX1;  a  UR                  U5        UR                  U5        M,     U$ )zz
Make the elements of a list unique by inserting them into a dictionary.
This must not change the order of the input lst.
)ÚsetÚappendÚadd)ÚlstÚseenÚresultr,   s       r#   Úuniquifyr™   ã   s=   € ô
 ‹5€DØ€FÛˆØ‹=Ø�M‰M˜!ÔØ�‰�Žñ ð €Mr%   c                ó�   • [        U5      U :”  a  [        S[        U5      U 4-  5      eU/U -  n[        U5      US[        U5      & U$ )a8  
Pads a sequence out to n elements,

filling in with a default value if it is not long enough.

If the input sequence is longer than n, raises ValueError.

Details, details:
This returns a new list; it does not extend the original sequence.
The new list contains the values of the original sequence, not copies.
z%d elements is more than %d.N)r|   Ú
ValueErrorrE   )ÚnÚseqrU   Úblanks       r#   ÚpadTorŸ   ñ   sL   € ô ˆ3ƒx�!ƒ|ÜÐ7¼3¸s»8ÀQ¸-ÑGÓHÐHàˆI˜‰M€Eä˜S›	€Eˆ*ŒC�‹HÐà€Lr%   c            	     ó  • [         R                  " S[        SS9  SS Kn [        R
                  R                  [        R
                  R                  [        R
                  R                  [        R
                  R                  U R                  5      5      5      S5      n[        R
                  R                  S5      n[        R
                  R                  S5      n[        [        R
                  R                  XU/5      nU$ )NzCtwisted.python.util.getPluginDirs is deprecated since Twisted 12.2.é   ©Ú
stacklevelr   Úpluginsz~/TwistedPluginsz
~/.twisted)ÚwarningsÚwarnÚDeprecationWarningÚtwistedÚosÚpathr`   ÚdirnameÚabspathÚ__file__Ú
expanduserÚfilterÚisdir)r¨   ÚsystemPluginsÚuserPluginsÚconfPluginsÚ
allPluginss        r#   ÚgetPluginDirsrµ     sª   € Ü‡M‚MØMÜØòó
 ä—G‘G—L‘LÜ
�‰�‰œŸ™Ÿ™¬¯©¯©¸×8HÑ8HÓ(IÓJÓKÈYó€Mô —'‘'×$Ñ$Ð%7Ó8€KÜ—'‘'×$Ñ$ \Ó2€KÜœŸ™Ÿ™¨ÀKÐ'PÓQ€JØÐr%   c                 ó†   • [         R                  " S[        SS9  [        R                  R                  [        5       5        g )NzBtwisted.python.util.addPluginDir is deprecated since Twisted 12.2.r¡   r¢   )r¥   r¦   r§   Úsysrª   Úextendrµ   © r%   r#   ÚaddPluginDirrº     s+   € Ü‡M‚MØLÜØòô
 ‡H�H‡O�O”M“OÕ$r%   c                ó¶   • [         R                  R                  [         R                  R                  [         R                  R	                  U 5      5      U5      $ )zÒ
Return the path to a sibling of a file in the filesystem.

This is useful in conjunction with the special C{__file__} attribute
that Python provides for modules, so modules can load associated
resource files.
)r©   rª   r`   r«   r¬   )rª   Úsiblings     r#   Úsibpathr½   "  s3   € ô �7‰7�<‰<œŸ™Ÿ™¬¯©¯©¸Ó(=Ó>ÀÓHÐHr%   c                óº   • SSK n UR                  U 5      $ ! [         a*  nUR                  [        R                  :X  a  [        ee SnAf[
         a    [        ef = f)z2
Helper to turn IOErrors into KeyboardInterrupts.
r   N)ÚgetpassÚOSErrorÚerrnoÚEINTRÚKeyboardInterruptÚEOFError)Úpromptr¿   Úes      r#   Ú_getpassrÇ   /  sR   € ó ð Ø�‰˜vÓ&Ð&øÜó Ø�7‰7”e—k‘kÓ!Ü#Ð#ØûÜó  ÜÐð ús   † —
A¡%AÁAc                ó<  • [        [        R                  S5      =(       a    [        R                  R                  5       nSn U(       d´  U(       aB   [        R                  [        R                  4n[        SS5      =[        l        [        l        Ok[        R                  R                  5       nUS   S:X  a  USS nUU(       a6  [        R                  R                  5         Uu  [        l        [        l        $ $  [        U 5      nU(       d?  UU(       a6  [        R                  R                  5         Uu  [        l        [        l        $ $ [        U5      n	X‰:X  a?  UU(       a6  [        R                  R                  5         Uu  [        l        [        l        $ $ [        R                  R                  US-   5        MÄ  ! [         a    [        S5      ef = f! U(       a6  [        R                  R                  5         Uu  [        l        [        l        f f = f)a  
Obtain a password by prompting or from stdin.

If stdin is a terminal, prompt for a new password, and confirm (if
C{confirm} is true) by asking again to make sure the user typed the same
thing, as keystrokes will not be echoed.

If stdin is not a terminal, and C{forceTTY} is not true, read in a line
and use it as the password, less the trailing newline, if any.  If
C{forceTTY} is true, attempt to open a tty and prompt for the password
using it.  Raise a RuntimeError if this is not possible.

@returns: C{str}
ÚisattyNz/dev/ttyzr+zCannot obtain a TTYéÿÿÿÿÚ
)Úhasattrr·   ÚstdinrÉ   ÚstdoutÚopenÚBaseExceptionÚRuntimeErrorÚreadlineÚcloserÇ   ÚstderrÚwrite)
rÅ   ÚconfirmÚforceTTYÚconfirmPromptÚmismatchMessageÚisaTTYÚoldÚpasswordÚtry1Útry2s
             r#   ÚgetPasswordrß   ?  s�  € ô* ”S—Y‘Y Ó)×@¬c¯i©i×.>Ñ.>Ó.@€Fà
€Cð(ÞÞð>ÜŸ)™)¤S§Z¡ZÐ/�CÜ-1°*¸dÓ-CÐC”C”I¤¥
ô Ÿ9™9×-Ñ-Ó/�Ø˜B‘< 4Ó'Ø'¨¨˜}�HØö Ü�I‰I�O‰OÔØ$'Ñ!ŒCŒI”s•zð ð Ü˜FÓ#ˆDÞØö Ü�I‰I�O‰OÔØ$'Ñ!ŒCŒI”s•zð ô ˜MÓ*ˆDØ‹|Øö Ü�I‰I�O‰OÔØ$'Ñ!ŒCŒI”s•zð ô —
‘
× Ñ  °4Ñ!7Ô8ñ øô %ó >Ü&Ð'<Ó=Ð=ð>ûö$ Ü�I‰I�O‰OÔØ$'Ñ!ŒCŒI”s•zð ús7   ÁG ÁA G Â.G Ã>G ÅG Æ$G ÇGÇG Ç?Hc                 ó‚   • [         R                  R                  SR                  [	        [
        U 5      5      S-   5        g )NÚ rË   )r·   rÎ   rÕ   r`   Úmapr2   )Úas    r#   Úprintlnrä   t  s(   € Ü‡J�J×Ñ�S—X‘Xœc¤# q›kÓ*¨TÑ1Õ2r%   c           
     óz   • SR                  U  Vs/ s H  n[        [        U5      U-  5      PM     sn5      $ s  snf )NÚ )r`   ÚchrÚord)ÚsÚbÚcs      r#   Ústr_xorrì   }  s/   € Ø�7‰7©QÓ/ªQ¨”Cœ˜A› ™
–O©QÑ/Ó0Ð0ùÒ/s   �!8c                óv   ^ ^^^^• T [        U5      -  mSS/4UUUUU 4S jjnSTS-  TTS-  T UT4-  Ul        U$ )zK
Creates a function that will return a string representing a progress bar.
r   ræ   c                ó´   >• [        U5      S:X  d   S5       e[        TU -  5      nT
U-
  S-
  nSTU-   T T	U-   S3nU(       a  XRS'   U$ XRS   :X  a  gXRS'   U$ )Nr7   z#Don't mess with the last parameter.r¡   Ú[Ú]r   ræ   )r|   Úint)ÚpositionÚforceÚlastÚdoneÚtoDor˜   ÚaValueÚcurrentCharÚdoneCharÚ
undoneCharÚwidths         €€€€€r#   ÚstatBarÚmakeStatBar.<locals>.statBar‡  s   ø€ Ü�4‹y˜A‹~ÐDÐDÓDˆ~Ü�6˜HÑ$Ó%ˆØ�t‰|˜aÑˆØ�X ‘_Ð% k ]°:ÀÑ3DÐ2EÀQÐGˆÞØ�‰GØˆMØ˜!‘WÓØØˆQ‰Øˆr%   aR  statBar(position, force = 0) -> '[%s%s%s]'-style progress bar

    returned string is %d characters long, and the range goes from 0..%d.
    The 'position' argument is where the '%s' will be drawn.  If force is false,
    '' will be returned instead if the resulting progress bar is identical to the
    previously returned progress bar.
é   )Úfloatr�   )rû   ÚmaxPositionrù   rú   rø   rü   r÷   s   ` ``` @r#   ÚmakeStatBarr  �  s[   ü€ ð ”U˜;Ó'Ñ'€Fà !¨¨÷ ó ðð 	�1‰ØØ�Q‰ØØØðñ€G„Oð €Nr%   c           
     óÒ  • SSK Jn  SU R                  ;   aˆ  U R                  S   n[        US5      (       a  UR	                  UR
                  5      nOUR	                  [        U5      5      n[        SU R                  R                   SU S[        U5       35        g[        SU R                  R                  < S	U R                  R                  < S
U R                  < 35        g)zN
A trace function for sys.settrace that prints every function or method call.
r   )Úreflectr    r"   zmethod z of z at z	function z in z, line N)Útwisted.pythonr  Úf_localsrÌ   Úqualr"   ÚtypeÚprintÚf_codeÚco_nameÚidÚco_filenameÚf_lineno)Úframeré   Úignoredr  Úser,   s         r#   Úspewerr  ¥  s©   € õ 'à�—‘ÓØ�^‰^˜FÑ#ˆÜ�2�{×#Ñ#Ø—‘˜RŸ\™\Ó*‰Aà—‘œT "›XÓ&ˆAÜ�˜Ÿ™×,Ñ,Ð-¨T°!°°D¼¸B»¸ÐAÕBåà�|‰|×#Ô# U§\¡\×%=Ô%=¸u¿~»~ðOõ	
r%   c                óP  • [         R                  R                  U 5      n U R                  [         R                  5      n[         R                  R
                  n[         R                  R                  n[         R                  R                  n[        U5      (       aŠ  U" U5      [         R                  -   nSnU H  n	U" U U	 35      (       a  M  Sn  O   U(       a  U H  n
U" U U
 35      (       a  M  Sn  O   U(       a  U$ UR                  S5        [        U5      (       a  MŠ  g)z»
Walk upwards from start, looking for a directory containing
all files and directories given as arguments::
>>> searchupwards('.', ['foo.txt'], ['bar', 'bam'])

If not found, return None
r7   r   rÊ   N)
r©   rª   r¬   ÚsplitÚsepÚexistsr`   r°   r|   rn   )ÚstartÚfilesÚdirsÚparentsr  r`   r°   Ú	candidateÚ
allpresentÚfÚds              r#   Úsearchupwardsr  ¹  sæ   € ô �G‰G�O‰O˜EÓ"€EØ�k‰kœ"Ÿ&™&Ó!€GÜ�W‰W�^‰^€FÜ�6‰6�;‰;€DÜ�G‰G�M‰M€EÜ
ˆg�,‰,Ù˜“M¤B§F¡FÑ*ˆ	Øˆ
ÛˆAÙ˜Y˜K¨ sÐ+×,Ó,Ø�
Ùñ ö Û�Ù 	˜{¨1¨#Ð.×/Ó/Ø!"�JÙñ ö ØÐØ�‰�BŒô ˆg�,‹,ð r%   c                  ó@   • \ rS rSrSrSS jrS rS rS rS r	S r
S	rg
)ÚLineLogiØ  zŒ
A limited-size line-based log, useful for logging line-based
protocols such as SMTP.

When the log fills up, old entries drop off the end.
c                ó6   • US:  a  SnS/U-  U l         Xl        g)zm
Create a new log, with size lines of storage (default 10).
A log size of 0 (or less) means an infinite log.
r   N©ÚlogÚsize)r    r$  s     r#   r   ÚLineLog.__init__à  s"   € ð
 �!‹8ØˆDØ�6˜D‘=ˆŒØ�	r%   c                ó²   • U R                   (       a+  U R                  SS  U R                  S S& XR                  S'   g U R                  R                  U5        g )Nr7   rÊ   )r$  r#  r”   )r    Úlines     r#   r”   ÚLineLog.appendê  s=   € Ø�9�9Ø ŸH™H Q R˜LˆD�H‰H�S�bˆMØ�H‰H�RŠLà�H‰H�O‰O˜DÕ!r%   c                ó   • [        U 5      $ r'   )r1   rG   s    r#   r2   ÚLineLog.strñ  s   € Ü�T‹{Ðr%   c                óL   • SR                  [        S U R                  5      5      $ )Nó   
)r`   r¯   r#  rG   s    r#   Ú	__bytes__ÚLineLog.__bytes__ô  s   € Ø�z‰zœ&  t§x¡xÓ0Ó1Ð1r%   c                ó4   • [        S U R                  5      U   $ r'   )r¯   r#  )r    Úitems     r#   r8   ÚLineLog.__getitem__÷  s   € Ü�d˜DŸH™HÓ% dÑ+Ð+r%   c                ó.   • S/U R                   -  U l        g)z
Empty the log.
N)r$  r#  rG   s    r#   rv   ÚLineLog.clearú  s   € ð �6˜DŸI™IÑ%ˆ�r%   r"  N)é
   )r‰   rŠ   r‹   rŒ   r�   r   r”   r2   r-  r8   rv   r�   r¹   r%   r#   r   r   Ø  s%   † ñôò"òò2ò,õ&r%   r   c                ó.   •  U" U0 UD6  g! U  a     gf = f)z>
Determine whether the given call raises the given exception.
r7   r   r¹   )Ú	exceptionr  ÚargsÚkwargss       r#   Úraisesr9    s-   € ðÙ	ˆ4Ð�6Òð øð ó Ùðús   ‚ ‹“c                  ó(   • \ rS rSrSrSS jrS rSrg)ÚIntervalDifferentiali  a«  
Given a list of intervals, generate the amount of time to sleep between
"instants".

For example, given 7, 11 and 13, the three (infinite) sequences::

    7 14 21 28 35 ...
    11 22 33 44 ...
    13 26 39 52 ...

will be generated, merged, and used to produce::

    (7, 0) (4, 1) (2, 2) (1, 0) (7, 0) (1, 1) (4, 2) (2, 0) (5, 1) (2, 0)

New intervals may be added or removed as iteration proceeds using the
proper methods.
c                ó$   • USS U l         X l        g)zí
@type intervals: C{list} of C{int}, C{long}, or C{float} param
@param intervals: The intervals between instants.

@type default: C{int}, C{long}, or C{float}
@param default: The duration to generate if the intervals list
becomes empty.
N)Ú	intervalsrU   )r    r=  rU   s      r#   r   ÚIntervalDifferential.__init__  s   € ð #¡1˜ˆŒØ�r%   c                óB   • [        U R                  U R                  5      $ r'   )Ú_IntervalDifferentialIteratorr=  rU   rG   s    r#   r�   ÚIntervalDifferential.__iter__+  s   € Ü,¨T¯^©^¸T¿\¹\ÓJÐJr%   )rU   r=  N)é<   )r‰   rŠ   r‹   rŒ   r�   r   r�   r�   r¹   r%   r#   r;  r;    s   † ñô$
õKr%   r;  c                  ó0   • \ rS rSrS rS r\rS rS rSr	g)r@  i/  c                óž   • [        U[        [        U5      5      5       VVs/ s H	  u  p4X3U/PM     snnU l        X l        SU l        g s  snnf rd   )ÚzipÚranger|   r=  rU   rô   )r    rr   r  rÆ   rœ   s        r#   r   Ú&_IntervalDifferentialIterator.__init__0  sA   € Ü25°a¼¼sÀ1»v»Ô2GÔHÒ2G©¨˜1 ›)Ñ2GÒHˆŒØŒØˆ�	ùó Is   ¢A	c                ó<  • U R                   (       d  U R                  S 4$ U R                   S   S   U R                   S   S   p!U R                   S   S==   U R                   S   S   -  ss'   U R                   R                  5         XR                  -
  nXl        X24$ )Nr   r¡   r7   )r=  rU   Úsortrô   )r    rô   Úindexr˜   s       r#   Ú__next__Ú&_IntervalDifferentialIterator.__next__5  s‹   € Ø�~�~Ø—L‘L $Ð'Ð'Ø—n‘n QÑ'¨Ñ*¨D¯N©N¸1Ñ,=¸aÑ,@ˆeØ�‰�qÑ˜!Ó §¡¨qÑ 1°!Ñ 4Ñ4ÓØ�‰×ÑÔØŸ	™	Ñ!ˆØŒ	Øˆ}Ðr%   c                óF  • U R                   (       as  U R                   S   S   U R                   S   S   -
  nU R                   R                  X!-   U[        U R                   5      /5        U R                   R                  5         g U R                   R                  XS/5        g )Nr   r7   )r=  r”   r|   rI  )r    rr   Údelays      r#   ÚaddIntervalÚ)_IntervalDifferentialIterator.addIntervalB  sy   € Ø�>�>Ø—N‘N 1Ñ% aÑ(¨4¯>©>¸!Ñ+<¸QÑ+?Ñ?ˆEØ�N‰N×!Ñ! 5¡9¨a´°T·^±^Ó1DÐ"EÔFØ�N‰N×ÑÕ!à�N‰N×!Ñ! 1¨ )Õ,r%   c                ó&  • [        [        U R                  5      5       He  nU R                  U   S   U:X  d  M  U R                  U   S   nU R                  U	 U R                   H  nUS   U:”  d  M  US==   S-  ss'   M       g    [        S5      e)Nr7   r¡   z.Specified interval not in IntervalDifferential)rF  r|   r=  r›   )r    Úintervalrr   rJ  s       r#   ÚremoveIntervalÚ,_IntervalDifferentialIterator.removeIntervalJ  sˆ   € Ü”s˜4Ÿ>™>Ó*Ö+ˆAØ�~‰~˜aÑ  Ñ# xÕ/ØŸ™ qÑ)¨!Ñ,�Ø—N‘N 1Ð%ØŸœ�AØ˜‘t˜e•|Ø˜!› ™	�ñ (ñ ñ ,ô ÐIÓJÐJr%   )rU   r=  rô   N)
r‰   rŠ   r‹   rŒ   r   rK  ÚnextrO  rS  r�   r¹   r%   r#   r@  r@  /  s   † òò
ð €Dò-õ	Kr%   r@  c                  ó6   • \ rS rSr% SrSrS\S'   SS jr\rSr	g)	ÚFancyStrMixiniV  a  
Mixin providing a flexible implementation of C{__str__}.

C{__str__} output will begin with the name of the class, or the contents
of the attribute C{fancybasename} if it is set.

The body of C{__str__} can be controlled by overriding C{showAttributes} in
a subclass.  Set C{showAttributes} to a sequence of strings naming
attributes, or sequences of C{(attributeName, callable)}, or sequences of
C{(attributeName, displayName, formatCharacter)}. In the second case, the
callable is passed the value of the attribute and its return value used in
the output of C{__str__}.  In the final case, the attribute is looked up
using C{attributeName}, but the output uses C{displayName} instead, and
renders the value of the attribute using C{formatCharacter}, e.g. C{"%.3f"}
might be used for a float.
r¹   zLSequence[Union[str, Tuple[str, str, str], Tuple[str, Callable[[Any], str]]]]ÚshowAttributesc                óú  • S[        U SU R                  R                  5      /nU R                   H§  n[	        U[
        5      (       a#  UR                  SU S[        X5      < 35        M;  [        U5      S:X  a2  UR                  SUS    S3US   " [        XS   5      5      -   5        M|  UR                  SUS   -   US   [        XS   5      4-  5        M©     UR                  S	5        S
R                  U5      $ )NÚ<Úfancybasenamerá   Ú=r¡   r   r7   z %s=Ú>ræ   )	Úgetattrr"   r‰   rX  r0   r2   r”   r|   r`   )r    ÚrÚattrs      r#   Ú__str__ÚFancyStrMixin.__str__m  sÞ   € Ø”'˜$ °·±×1HÑ1HÓIÐJˆð ×'Ô'ˆDÜ˜$¤×$Ñ$Ø—‘˜1˜T˜F !¤G¨DÓ$7Ñ#:Ð;Ö<Ü�T“˜a“Ø—‘˜A˜d 1™g˜Y a˜.¨D°ªG´G¸DÀqÁ'Ó4JÓ,KÑKÖLà—‘˜& 4¨¡7Ñ*¨t°A©w¼ÀÈ1ÁgÓ8NÐ.OÑOÖPñ (ð 	
�‰�ŒØ�w‰w�q‹zÐr%   Nr„   )
r‰   rŠ   r‹   rŒ   r�   rX  Ú__annotations__ra  ra   r�   r¹   r%   r#   rW  rW  V  s'   ‡ ñð( 	ð ð ó ôð ƒHr%   rW  c                  ó<   • \ rS rSr% SrSrS\S'   S	S jrS	S jrSr	g)
ÚFancyEqMixini  z‚
Mixin that implements C{__eq__} and C{__ne__}.

Comparison is done using the list of attributes defined in
C{compareAttributes}.
r¹   zClassVar[Sequence[str]]ÚcompareAttributesc                ó²   ^ ^• T R                   (       d  T TL $ [        T TR                  5      (       a   [        UU 4S jT R                    5       5      $ [        $ )Nc              3  óV   >#   • U  H  n[        TU5      [        TU5      :H  v •  M      g 7fr'   )r^  )Ú.0Únamer�   r    s     €€r#   Ú	<genexpr>Ú&FancyEqMixin.__eq__.<locals>.<genexpr>�  s+   øé € ð â2�Dô ˜˜dÓ#¤w¨u°dÓ';Ö;Ú2ùs   ƒ&))rf  r0   r"   Úallr€   )r    r�   s   ``r#   r‚   ÚFancyEqMixin.__eq__‰  sO   ù€ Ø×%×%Ø˜5�=Ð Ü�d˜EŸO™O×,Ñ,Üõ à ×2Ò2óó ð ô Ðr%   c                óH   • U R                  U5      nU[        L a  U$ U(       + $ r'   )r‚   r€   )r    r�   r˜   s      r#   Ú__ne__ÚFancyEqMixin.__ne__“  s%   € Ø—‘˜UÓ#ˆØ”^Ò#ØˆMØŒzÐr%   Nr†   )
r‰   rŠ   r‹   rŒ   r�   rf  rc  r‚   rp  r�   r¹   r%   r#   re  re    s   ‡ ñð 24ÐÐ.Ó3ô÷r%   re  )Ú
initgroupsc                ó   • g)zS
Do nothing.

Underlying platform support require to manipulate groups is missing.
Nr¹   ©ÚuidÚ
primaryGids     r#   rr  rr  ¥  s   � r%   c                óT   • [        [        R                  U 5      R                  U5      $ )až  
Initializes the group access list.

This uses the stdlib support which calls initgroups(3) under the hood.

If the given user is a member of more than C{NGROUPS}, arbitrary
groups will be silently discarded to bring the number below that
limit.

@type uid: C{int}
@param uid: The UID for which to look up group information.

@type primaryGid: C{int}
@param primaryGid: The GID to include when setting the groups.
)Ú_initgroupsÚpwdÚgetpwuidÚpw_namert  s     r#   rr  rr  ®  s    € ô  œ3Ÿ<™<¨Ó,×4Ñ4°jÓAÐAr%   c                óÈ  • U(       a1  [         R                  n[         R                  n[         R                  nO0[         R                  n[         R
                  n[         R                  nUb  U" U5        U bl  X" 5       :X  aN  U=(       a    S=(       d    SnSU SU  3nU SU" 5        3n[        R                  " SR                  Xx5      5        g[        X5        U" U 5        gg)a}  
Attempts to switch the uid/euid and gid/egid for the current process.

If C{uid} is the same value as L{os.getuid} (or L{os.geteuid}),
this function will issue a L{UserWarning} and not raise an exception.

@type uid: C{int} or L{None}
@param uid: the UID (or EUID) to switch the current process to. This
            parameter will be ignored if the value is L{None}.

@type gid: C{int} or L{None}
@param gid: the GID (or EGID) to switch the current process to. This
            parameter will be ignored if the value is L{None}.

@type euid: C{bool}
@param euid: if True, set only effective user-id rather than real user-id.
             (This option has no effect unless the process is running
             as root, in which case it means not to shed all
             privileges, retaining the option to regain privileges
             in cases such as spawning processes. Use with caution.)
NÚeuidru  z tried to drop privileges and setrá   z is already z){} but {}; should we be root? Continuing.)r©   ÚseteuidÚsetegidÚgeteuidÚsetuidÚsetgidÚgetuidr¥   r¦   Úformatrr  )	ru  Úgidr}  r�  r‚  rƒ  ÚuidTextÚ
actionTextÚproblemTexts	            r#   Ú	switchUIDr‰  Á  s¼   € ö, Ü—‘ˆÜ—‘ˆÜ—‘‰ä—‘ˆÜ—‘ˆÜ—‘ˆØ
�ÙˆsŒØ
�Ø�&“(‹?Ø—o˜v×.¨ˆGØ;¸G¸9ÀAÀcÀUÐKˆJØ$˜I \±&³(°Ð<ˆKÜ�MŠMØ;×BÑBØóõô �sÔ Ù�3�Kð r%   c                óŠ   •   U " U0 UD6$ ! [          a-  nUR                  S   [        R                  :X  a   SnAM;  e SnAff = f)aF  
Call C{f} with the given arguments, handling C{EINTR} by retrying.

@param f: A function to call.

@param a: Positional arguments to pass to C{f}.

@param kw: Keyword arguments to pass to C{f}.

@return: Whatever C{f} returns.

@raise Exception: Whatever C{f} raises, except for C{OSError} with
    C{errno} set to C{EINTR}.
r   N)rÀ   r7  rÁ   rÂ   )r  rã   ÚkwrÆ   s       r#   ÚuntilConcludesrŒ  ð  sD   € ð ð	Ù�a�;˜2‘;ÐøÜó 	Ø�v‰v�a‰yœEŸK™KÓ'ÝØûð	ús   ƒ ‹
A•!=¼=½Ac                óX  •  U R                   Ul          U R                  Ul         UR                  R                  U R                  5         U R                  Ul        U$ ! [         a     NXf = f! [        [        4 a     N\f = f! [        [        4 a     NLf = f! [         a     U$ f = f)z½
Overwrite C{g}'s name and docstring with values from C{f}.  Update
C{g}'s instance dictionary with C{f}'s.

@return: A function that has C{g}'s behavior and metadata merged from
    C{f}.
)r‰   Ú	TypeErrorr�   ÚAttributeErrorÚ__dict__r   rŠ   )r  Úgs     r#   ÚmergeFunctionMetadatar’    s°   € ðØ—Z‘ZˆŒ
ðØ—I‘IˆŒ	ðØ	�
‰
×Ñ˜!Ÿ*™*Ô%ðØ—|‘|ˆŒð €Høô ó Ùðûô ”~Ð&ó Ùðûô ”~Ð&ó Ùðûô ó ØØ€HðúsE   ‚A ”A/ ¦%B ÁB Á
A,Á+A,Á/BÂBÂBÂBÂ
B)Â(B)c                ó®  • / nSnSnU  Hz  nUR                  5       U:X  a  X$-  nONU(       a4  [        U5      S:X  a  X$-  nO3USS nUS   nUR                  U5        Xd-   nOUR                  U5        UnUR                  5       nM|     U(       a  US   R                  5       US'   OU R                  5       $ UR                  U5        SR	                  U5      $ )aY  
Convert a string like a variable name into a slightly more human-friendly
string with spaces and capitalized letters.

@type mname: C{str}
@param mname: The name to convert to a label.  This must be a string
which could be used as a Python identifier.  Strings which do not take
this form will result in unpredictable behavior.

@rtype: C{str}
ræ   Fr7   NrÊ   r   rá   )Úisupperr|   r”   Ú
capitalizer`   )ÚmnameÚ	labelListÚwordÚlastWasUpperÚletterÚlastWordÚfirstLetters          r#   ÚnameToLabelr�  #  sÞ   € ð €IØ€DØ€LÛˆØ�>‰>Ó˜|Ó+à‰N‰Dö ä�t“9 “>à‘N‘Dð  $ C R˜y�HØ"& r¡(�KØ×$Ñ$ XÔ.Ø&Ñ/‘Dð × Ñ  Ô&Ø�Ø—~‘~Ó'Šñ- ö. Ø  ‘|×.Ñ.Ó0ˆ	�!Šà×ÑÓ!Ð!Ø×Ñ�TÔØ�8‰8�IÓÐr%   c                óz   •  [        U 5      $ ! [         a#    [        c  e [        R                  U 5      S   s $ f = f)a‹  
Convert a user identifier, as a string, into an integer UID.

@type uidString: C{str}
@param uidString: A string giving the base-ten representation of a UID or
    the name of a user which can be converted to a UID via L{pwd.getpwnam}.

@rtype: C{int}
@return: The integer UID corresponding to the given string.

@raise ValueError: If the user name is supplied and L{pwd} is not
    available.
r¡   )rñ   r›   ry  Úgetpwnam)Ú	uidStrings    r#   ÚuidFromStringr¡  Q  ó<   € ð*Ü�9‹~ÐøÜó *Ü‰;ØÜ�|‰|˜IÓ& qÑ)Ò)ð*úó   ‚
 �*:¹:c                óz   •  [        U 5      $ ! [         a#    [        c  e [        R                  U 5      S   s $ f = f)aŽ  
Convert a group identifier, as a string, into an integer GID.

@type gidString: C{str}
@param gidString: A string giving the base-ten representation of a GID or
    the name of a group which can be converted to a GID via L{grp.getgrnam}.

@rtype: C{int}
@return: The integer GID corresponding to the given string.

@raise ValueError: If the group name is supplied and L{grp} is not
    available.
r¡   )rñ   r›   ÚgrpÚgetgrnam)Ú	gidStrings    r#   ÚgidFromStringr¨  g  r¢  r£  c                ó  • [         R                  " 5       [         R                  " 5       peXP:X  a  Xa:X  a  U" U0 UD6$ US:w  a   XP:w  d  Xa:w  a  [         R                  " S5        Xa:w  a  [         R                  " U5        U S:w  a   X:w  d  Xa:w  a  [         R                  " U 5         U" U0 UD6U S:w  a   XP:w  d  Xa:w  a  [         R                  " S5        Xa:w  a  [         R                  " U5        US:w  a"  XP:w  d  Xa:w  a  [         R                  " U5        $ $ $ ! U S:w  a   XP:w  d  Xa:w  a  [         R                  " S5        Xa:w  a  [         R                  " U5        US:w  a"  XP:w  d  Xa:w  a  [         R                  " U5        f f f = f)aü  
Run the given function wrapped with seteuid/setegid calls.

This will try to minimize the number of seteuid/setegid calls, comparing
current and wanted permissions

@param euid: effective UID used to call the function.
@type euid: C{int}

@type egid: effective GID used to call the function.
@param egid: C{int}

@param function: the function run with the specific permission.
@type function: any callable

@param args: arguments passed to C{function}
@param kwargs: keyword arguments passed to C{function}
r   )r©   r€  Úgetegidr~  r  )r}  ÚegidÚfunctionr7  r8  ru  r…  s          r#   ÚrunAsEffectiveUserr­  }  s"  € ô& �zŠz‹|œRŸZšZ›\ˆØ
ƒ{�s“{Ù˜Ð( Ñ(Ð(à�!‹8˜›¨«Ü�JŠJ�qŒMØ‹;Ü�JŠJ�tÔØ�1‹9˜$›+¨«Ü�JŠJ�tÔð	 Ù˜TÐ, VÑ,à�q‹y˜c›k¨S«[Ü—
’
˜1”Ø‹{Ü—
’
˜3”Ø�a‹x˜S›[¨C«KÜ—
’
˜3•ð -8ˆxøð	 �q‹y˜c›k¨S«[Ü—
’
˜1”Ø‹{Ü—
’
˜3”Ø�a‹x˜S›[¨C«KÜ—
’
˜3•ð -8ˆxús   Â$D ÄA+F c                ó´   • [         R                  " 5          U  H  u  pE[         R                  " U0 UD6  M     U" U0 UD6sSSS5        $ ! , (       d  f       g= f)aà  
Run C{f(*args, **kwargs)}, but with some warnings suppressed.

Unlike L{twisted.internet.utils.runWithWarningsSuppressed}, it has no
special support for L{twisted.internet.defer.Deferred}.

@param suppressedWarnings: A list of arguments to pass to
    L{warnings.filterwarnings}.  Must be a sequence of 2-tuples (args,
    kwargs).

@param f: A callable.

@param args: Arguments for C{f}.

@param kwargs: Keyword arguments for C{f}

@return: The result of C{f(*args, **kwargs)}.
N)r¥   Úcatch_warningsÚfilterwarnings)ÚsuppressedWarningsr  r7  r8  rã   r‹  s         r#   ÚrunWithWarningsSuppressedr²  ¥  sH   € ô& 
×	 Ò	 Õ	"Û'‰EˆAÜ×#Ò# QÐ-¨"Ô-ñ (á�$Ð!˜&Ñ!÷ 
#×	"×	"ús   –)A	Á	
A)r™   rŸ   rµ   rº   r½   rß   rä   r  r   r   r  r  r   r9  r;  rW  re  r‰  r’  r�  r¡  r¨  r­  rŒ  r²  r'   )rª   úos.PathLike[AnyStr] | AnyStrr¼   r³  r…   r   )z
Password: r   r   zConfirm password: zPasswords don't match.)r\  Ú-r]  )F)AÚ
__future__r   rÁ   r©   r·   r¥   Útypingr   r¥  Ú_grpry  Ú_pwdÚImportErrorr   Ú
_getgroupsr   Ú
_setgroupsÚcollectionsr   r   r	   r
   r   r   r   r   r   r   Úincrementalr   Útwisted.python.deprecater   r   r2   r   r™   rŸ   rµ   rº   r½   rÇ   rß   rä   rì   r  r  r  r   r9  r;  r@  rW  re  rr  Ú__initgroupsrx  r‰  rŒ  r’  r�  r¡  r¨  r­  r²  Ú__all__r¹   r%   r#   Ú<module>rÁ     só  ðõ #ã Û 	Û 
Û Ý ðÛÛð
 €CØ
€CðßCð
 €IØ€Iõ $÷
÷ 
õ 
õ  å >á ÙˆI�r˜1˜aÓ Ø*ØØô	ñ ˆTƒ]€ôe"�n S¨" WÑ-ô e"òPôò.ò"%ð
IØ
&ð
IØ1Mð
Iàô
Iò ð" ØØØ&Ø,ô2(òj3ò1ô!òH
ð(  "¨ô ÷>&&ñ &&òR÷ Kñ  K÷F$Kñ $K÷N&ñ &÷Rñ ð6å-ð €Kð ÑóòBô&,ò^ò0ò6+ò\*ò,*ò,% òP"ò2�øð_ ó Ø
€CØ
ƒCðûð ó Ø€IØƒIðûðJ ó Ø‚Kðús4   žD- «D> Ã<E Ä-
D;Ä:D;Ä>
EÅEÅEÅE