ó
    Ñ]j©x  ã                  óà  • % S SK Jr   S SKrS SKrS SKrS SKJrJr  S SKJr  SSK	J
r
  SSKJr  SSKJrJr  S	S
KJr  S	SKJr  S	SKJr  S SKJrJrJrJr  S SKJr  S SKrS SKJrJrJ r J!r!J"r"  \RF                  (       a  S SK$J%r%  S SK&J'r'  \!" S\S\4   S9r(\ S   r)\ S   r*\+" 0 0 S9r,S\-S'   Sr.S\-S'   Sr/S\-S'   \+" \\S9r0S\-S'    " S S 5      r1S7S! jr2S8S" jr3\!" S#\4S$   S9r5S9S% jr6          S:S& jr7S;S' jr8S(r9    S<S) jr:    S<S* jr;S+r<S,r=S=S- jr>S=S. jr?\:" S/5      r@\:" S05      rA\:" S15      rB\;" S/5      rC\;" S05      rD\;" S15      rE " S2 S3\5      rF " S4 S$\5      rG " S5 S65      rHg)>é    )ÚannotationsN)ÚgetoptÚGetoptError)ÚConfigurableé   )Úoinspect)Ú
UsageError)Ú	ESC_MAGICÚ
ESC_MAGIC2é   )ÚStruct)Ú	arg_split)Údedent)ÚBoolÚDictÚInstanceÚobserve)Úerror)ÚAnyÚCallableÚLiteralÚTypeVarÚoverload)Ú	FrameType)ÚInteractiveShellÚ_F.)Úbound©ÚlineÚcell)r   r    Ú	line_cellúdict[str, dict[str, str]]Úmagicsztuple[_MagicKind, ...]Úmagic_kindsztuple[_MagicSpec, ...]Ú
magic_speczdict[_MagicKind, str]Úmagic_escapesc                  ó   • \ rS rSrSrg)ÚBunché?   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r*   ó    ÚO/home/mande/repo/quber/.venv/lib/python3.13/site-packages/IPython/core/magic.pyr(   r(   ?   s   † Úr0   r(   c                ó˜   • U SS U SS p!/ n[        5       nU H,  nXT;   a  M
  UR                  U5        UR                  U5        M.     X2-   $ )z§Compress a directory history into a new one with at most 20 entries.

Return a new list made from the first and last 10 elements of dhist after
removal of duplicates.
Niöÿÿÿ)ÚsetÚappendÚadd)ÚdhÚheadÚtailÚnewheadÚdoneÚhs         r1   Úcompress_dhistr<   C   sV   € ð �D�S�˜2˜c˜d˜8ˆ$à€GÜ“U€DÛˆØ‹9ÙØ�‰�qÔØ�‰�Žñ	 ð ‰>Ðr0   c                ó   • SU l         U $ )zCDecorator to mark magic functions which need to local scope to run.T)Úneeds_local_scope)Úfuncs    r1   r>   r>   V   s   € à!€DÔØ€Kr0   Ú_TÚMagicsc                ór   • SU l         [        [        S   [        S   S9U l        0 [        S'   0 [        S'   U $ )ao  Class decorator for all subclasses of the main Magics class.

Any class that subclasses Magics *must* also apply this decorator, to
ensure that all the methods that have been decorated as line/cell magics
get correctly registered in the class instance.  This is necessary because
when method decorators run, the class does not exist yet, so they
temporarily store their information into a module global.  Application of
this class decorator copies that global data to the class instance and
clears the global.

Obviously, this mechanism is not thread-safe, which means that the
*creation* of subclasses of Magic should only be done in a single-thread
context.  Instantiation of the classes has no restrictions.  Given that
these classes are typically created at IPython startup time and before user
application code becomes active, in practice this should not pose any
problems.
Tr   r    r   )Ú
registeredÚdictr#   )Úclss    r1   Úmagics_classrF   d   s8   € ð$ €C„NÜœ6 &™>´°v±Ñ?€C„JØ„Fˆ6�NØ„Fˆ6�NØ€Jr0   c                ó@   • US:X  a  U=U S   U'   U S   U'   gX0U   U'   g)a'  Utility function to store a function as a magic of a specific kind.

Parameters
----------
dct : dict
    A dictionary with 'line' and 'cell' subdicts.
magic_kind : str
    Kind of magic to be stored.
magic_name : str
    Key to store the magic as.
func : function
    Callable object to store.
r!   r   r    Nr*   )ÚdctÚ
magic_kindÚ
magic_namer?   s       r1   Úrecord_magicrK   }   s4   € ð& �[Ó Ø<@Ð@ˆˆF‰�JÑ # f¡+¨jÒ"9à&*ˆJ‰˜
Ò#r0   c                ó>   • U [         ;  a  [        S[        -  U 5      eg)z¯Ensure that the given magic_kind is valid.

Check that the given magic_kind is one of the accepted spec types (stored
in the global `magic_spec`), raise ValueError otherwise.
ú&magic_kind must be one of %s, %s givenN)r%   Ú
ValueErrorr$   )rI   s    r1   Úvalidate_typerO   –   s(   € ð œÓ#ÜØ4´{ÑBÀJó
ð 	
ð $r0   aü  Decorate the given {0} as {1} magic.

The decorator can be used with or without arguments, as follows.

i) without arguments: it will create a {1} magic named as the {0} being
decorated::

    @deco
    def foo(...)

will create a {1} magic named `foo`.

ii) with one string argument: which will be used as the actual name of the
resulting magic::

    @deco('bar')
    def foo(...)

will create a {1} magic named `bar`.

To register a class magic use ``Interactiveshell.register_magic(class or instance)``.
c                ód   ^ • [        T 5        SU 4S jjn[        R                  ST 5      Ul        U$ )z3Decorator factory for methods in Magics subclasses.c                óÌ   >^• [        U 5      (       a$  U nUR                  mU n[        [        TTT5        U$ [	        U [
        5      (       a  U mSUU4S jjnUnU$ [        S5      e)Nc                ó@   >• [        [        TTU R                  5        U $ ©N)rK   r#   r+   )r?   ÚaÚkwrI   Únames      €€r1   ÚmarkÚ6_method_magic_marker.<locals>.magic_deco.<locals>.mark×   s   ø€ ÜœV Z°°t·}±}ÔEØ�r0   ú4Decorator can only be called with string or function©r?   r   rT   r   rU   r   Úreturnr   )Úcallabler+   rK   r#   Ú
isinstanceÚstrÚ	TypeError)Úargr?   ÚretvalrW   rV   rI   s       @€r1   Ú
magic_decoÚ(_method_magic_marker.<locals>.magic_decoË   sn   ù€ ä�C�=‰=àˆDØ—=‘=ˆDØˆFÜœ ¨T°4Ô8ð ˆô ˜œS×!Ñ!àˆD÷ð ð ˆFð ˆô ÐRÓSÐSr0   Úmethod©r`   z_F | strr[   z_F | Callable[[_F], _F])rO   Ú_docstring_templateÚformatÚ__doc__)rI   rb   s   ` r1   Ú_method_magic_markerri   Â   s/   ø€ ô
 �*Ô÷ô, -×3Ñ3°H¸jÓI€JÔØÐr0   c                ó‚   ^ • [        T 5        SU 4S jjn[        R                  ST 5      nU[        S5      -  nX!l        U$ )z+Decorator factory for standalone functions.c                óv  >^^• [         R                  " S5      nS nS H"  n[        X5      R                  S5      nUc  M"    O   [	        S5      eU" 5       m[        U 5      (       a%  U nUR                  mTR                  UT	T5        U nU$ [        U [        5      (       a  U mSUU	U4S jjnUnU$ [        S5      e)Nr   )Úf_localsÚ	f_globalsÚ
f_builtinsÚget_ipythonz<Decorator can only run in context where `get_ipython` existsc                ó.   >• TR                  U TT5        U $ rS   )Úregister_magic_function)r?   rT   rU   ÚiprI   rV   s      €€€r1   rW   Ú8_function_magic_marker.<locals>.magic_deco.<locals>.mark  s   ø€ Ø×*Ñ*¨4°¸TÔBØ�r0   rY   rZ   )ÚsysÚ	_getframeÚgetattrÚgetÚ	NameErrorr\   r+   rq   r]   r^   r_   )
r`   Úcallerro   Únsr?   ra   rW   rr   rV   rI   s
          @@€r1   rb   Ú*_function_magic_marker.<locals>.magic_decoí   sÊ   ú€ äŸMšM¨!Ó,ˆØ=AˆÛ9ˆBÜ! &Ó-×1Ñ1°-Ó@ˆKØÓ&Ùñ :ô
 ØNóð ñ  +›}ˆô �C�=‰=àˆDØ—=‘=ˆDØ×&Ñ& t¨Z¸Ô>ØˆFð ˆô ˜œS×!Ñ!àˆD÷ñ ð ˆFð ˆô ÐRÓSÐSr0   ÚfunctionaÄ  
    Note: this decorator can only be used in a context where IPython is already
    active, so that the `get_ipython()` call succeeds.  You can therefore use
    it in your startup files loaded after IPython initializes, but *not* in the
    IPython configuration file itself, which is executed before IPython is
    fully up and running.  Any file located in the `startup` subdirectory of
    your configuration profile will be OK in this sense.
    re   )rO   rf   rg   r   rh   )rI   rb   Údss   `  r1   Ú_function_magic_markerr~   å   sK   ø€ ô �*Ô÷!ôH 
×	#Ñ	# J°
Ó	;€BàŒ&ð	ó	ñ 	€Bð ÔØÐr0   Ú_ipython_magic_no_var_expandÚ%_ipython_magic_output_can_be_silencedc                ó(   • [        U [        S5        U $ )a¸  Mark a magic function as not needing variable expansion

By default, IPython interprets `{a}` or `$a` in the line passed to magics
as variables that should be interpolated from the interactive namespace
before passing the line to the magic function.
This is not always desirable, e.g. when the magic executes Python code
(%timeit, %time, etc.).
Decorate magics with `@no_var_expand` to opt-out of variable expansion.

.. versionadded:: 7.3
T)ÚsetattrÚMAGIC_NO_VAR_EXPAND_ATTR©Ú
magic_funcs    r1   Úno_var_expandr†   &  s   € ô ˆJÔ0°$Ô7ØÐr0   c                ó(   • [        U [        S5        U $ )zÈMark a magic function so its output may be silenced.

The output is silenced if the Python code used as a parameter of
the magic ends in a semicolon, not counting a Python comment that can
follow it.
T)r‚   ÚMAGIC_OUTPUT_CAN_BE_SILENCEDr„   s    r1   Úoutput_can_be_silencedr‰   6  s   € ô ˆJÔ4°dÔ;ØÐr0   r   r    r!   c                  ó€  ^ • \ rS rSrSr\" 5       r\" SS9R                  SS9r\" 5       r	\
" SSS9r\" SS	S9R                  SS9r\" S
5      SS j5       rSS/r\
" SSS9r   S         SU 4S jjjrSS jrSS jr S     SS jjrSS jrS S jr  S!       S"S jjr  S!         S#S jjrSrU =r$ )$ÚMagicsManageriS  z@Object that handles all magic-related functionality for IPython.aM  
    Mapping from magic names to modules to load.

    This can be used in IPython/IPykernel configuration to declare lazy magics
    that will only be imported/registered on first use.

    For example::

        c.MagicsManager.lazy_magics = {
          "my_magic": "slow.to.import",
          "my_other_magic": "also.slow",
        }

    On first invocation of `%my_magic`, `%%my_magic`, `%%my_other_magic` or
    `%%my_other_magic`, the corresponding module will be loaded as an ipython
    extensions as if you had previously done `%load_ext ipython`.

    Magics names should be without percent(s) as magics can be both cell
    and line magics.

    Lazy loading happen relatively late in execution process, and
    complex extensions that manipulate Python/IPython internal state or global state
    might not support lazy loading.
    )ÚhelpT)Úconfigz1IPython.core.interactiveshell.InteractiveShellABC)Ú
allow_nonezBAutomatically call line magics without requiring explicit % prefixÚ
auto_magicc                óJ   • U R                   c   eUS   U R                   l        g )NÚnew)ÚshellÚ	automagic)ÚselfÚchanges     r1   Ú_auto_magic_changedÚ!MagicsManager._auto_magic_changed„  s"   € à�z‰zÑ%Ð%Ð%Ø% e™}ˆ�
‰
Õr0   z5Automagic is OFF, % prefix IS needed for line magics.z8Automagic is ON, % prefix IS NOT needed for line magics.zIPython.core.magics.UserMagicsc                óž   >• [         [        U ]
  " SXUS.UD6  [        0 0 S9U l        Ub#  X0R
                  UR                  R                  '   g g )N)r’   r�   Úuser_magicsr   r*   )Úsuperr‹   Ú__init__rD   r#   ÚregistryÚ	__class__r+   )r”   r’   r�   r™   Útraitsr�   s        €r1   r›   ÚMagicsManager.__init__�  s[   ø€ ô 	Œm˜TÒ+ð 	
Ø°Kñ	
ØCIò	
ô  ¨Ñ,ˆŒð Ñ"Ø<G�M‰M˜+×/Ñ/×8Ñ8Ò9ð #r0   c                ó4   • U R                   U R                     $ )z0Return descriptive string with automagic status.)Ú_auto_statusr�   ©r”   s    r1   Úauto_statusÚMagicsManager.auto_status   s   € à× Ñ  §¡Ñ1Ð1r0   c                ó   • U R                   $ )z¼Return a dict of currently available magic functions.

The return dict has the keys 'line' and 'cell', corresponding to the
two types of magics we support.  Each value is a list of names.
©r#   r¢   s    r1   ÚlsmagicÚMagicsManager.lsmagic¤  s   € ð �{‰{Ðr0   c                óB  • 0 nU R                    HŒ  n0 nU R                   U   R                  5        Hb  u  pgUR                  (       aH  U(       a#  UR                  R                  SS5      S   XV'   M@  UR                  R	                  5       XV'   M^  X%U'   Md     XSU'   MŽ     U$ )ay  Return dict of documentation of magic functions.

The return dict has the keys 'line' and 'cell', corresponding to the
two types of magics we support. Each value is a dict keyed by magic
name whose value is the function docstring. If a docstring is
unavailable, the value of `missing` is used instead.

If brief is True, only the first line of each docstring will be returned.
Ú
r   r   )r#   Úitemsrh   ÚsplitÚrstrip)r”   ÚbriefÚmissingÚdocsÚm_typeÚm_docsÚm_nameÚm_funcs           r1   Úlsmagic_docsÚMagicsManager.lsmagic_docs¬  sŒ   € ð +-ˆØ—k”kˆFØ%'ˆFØ"&§+¡+¨fÑ"5×";Ñ";Ö"=‘�Ø—>—>ÞØ)/¯©×)=Ñ)=¸dÀAÓ)FÀqÑ)I˜›à)/¯©×)>Ñ)>Ó)@˜›à%,˜6“Nñ #>ð "�‹Lñ "ð ˆr0   c                ó    • X R                   U'   g)a_  
Lazily register a magic via an extension.


Parameters
----------
name : str
    Name of the magic you wish to register.
fully_qualified_name :
    Fully qualified name of the module/submodule that should be loaded
    as an extensions when the magic is first called.
    It is assumed that loading this extensions will register the given
    magic.
N)Úlazy_magics)r”   rV   Úfully_qualified_names      r1   Úregister_lazyÚMagicsManager.register_lazyÆ  s   € ð  "6×Ñ˜Òr0   c                óL  • U Hž  nUR                   (       d  [        S5      e[        U[        5      (       a  U" U R                  S9nX R
                  UR                  R                  '   [         H.  nU R                  U   R                  UR                  U   5        M0     M      g)aÚ  Register one or more instances of Magics.

Take one or more classes or instances of classes that subclass the main
`core.Magic` class, and register them with IPython to use the magic
functions they provide.  The registration process will then ensure that
any methods that have decorated to provide line and/or cell magics will
be recognized with the `%x`/`%%x` syntax as a line/cell magic
respectively.

If classes are given, they will be instantiated with the default
constructor.  If your classes need a custom constructor, you should
instanitate them first and pass the instance.

The provided arguments can be an arbitrary mix of classes and instances.

Parameters
----------
*magic_objects : one or more classes or instances
zOClass of magics %r was constructed without the @register_magics class decorator)r’   N)rC   rN   r]   Útyper’   rœ   r�   r+   r$   r#   Úupdate)r”   Úmagic_objectsÚmÚmtypes       r1   ÚregisterÚMagicsManager.registerØ  s…   € ó, ˆAØ—<—<Ü ð;óð ô ˜!œT×"Ñ"á˜DŸJ™JÑ'�ð 34�M‰M˜!Ÿ+™+×.Ñ.Ñ/ß$�Ø—‘˜EÑ"×)Ñ)¨!¯(©(°5©/Ö:ó %ò r0   c                ó´   • [        U5        Uc  UR                  OUnU R                  c   e[        U R                  X15        [	        U R
                  X#U5        g)a  Expose a standalone function as magic function for IPython.

This will create an IPython magic (line, cell or both) from a
standalone function.  The functions should have the following
signatures:

* For line magics: `def f(line)`
* For cell magics: `def f(line, cell)`
* For a function that does both: `def f(line, cell=None)`

In the latter case, the function will be called with `cell==None` when
invoked as `%f`, and with cell as a string when invoked as `%%f`.

Parameters
----------
func : callable
    Function to be registered as a magic.
magic_kind : str
    Kind of magic, one of 'line', 'cell' or 'line_cell'
magic_name : optional str
    If given, the name the magic will have in the IPython namespace. By
    default, the name of the function itself is used.
N)rO   r+   r™   r‚   rK   r#   )r”   r?   rI   rJ   s       r1   Úregister_functionÚMagicsManager.register_functionþ  sO   € ô@ 	�jÔ!Ø&0Ñ&8�T—]’]¸jˆ
Ø×ÑÑ+Ð+Ð+Ü�× Ñ  *Ô3Ü�T—[‘[ *¸$Õ?r0   c                ó  • U[         ;  a  [        S[         -  U5      eU R                  c   eU R                  c   e[	        U R                  X#U5      n[        U R                  X5        [        U R                  X1U5        g)aË  Register an alias to a magic function.

The alias is an instance of :class:`MagicAlias`, which holds the
name and kind of the magic it should call. Binding is done at
call time, so if the underlying magic function is changed the alias
will call the new function.

Parameters
----------
alias_name : str
    The name of the magic to be registered.
magic_name : str
    The name of an existing magic.
magic_kind : str
    Kind of magic, one of 'line' or 'cell'
rM   N)r$   rN   r’   r™   Ú
MagicAliasr‚   rK   r#   )r”   Ú
alias_namerJ   rI   Úmagic_paramsÚaliass         r1   Úregister_aliasÚMagicsManager.register_alias$  sy   € ð4 œ[Ó(ÜØ8¼;ÑFÈ
óð ð �z‰zÑ%Ð%Ð%Ø×ÑÑ+Ð+Ð+Ü˜4Ÿ:™: z¸|ÓLˆÜ�× Ñ  *Ô4Ü�T—[‘[ *¸%Õ@r0   r¦   )r•   zdict[str, Any]r[   ÚNone)NNN)
r’   úInteractiveShell | Noner�   r   r™   zMagics | Nonerž   r   r[   rÎ   )r[   r^   )r[   údict[str, dict[str, Any]])FÚ )r®   Úboolr¯   r^   r[   r"   )rV   r^   r¹   r^   r[   rÎ   )r¿   ztype[Magics] | Magicsr[   rÎ   )r   N)r?   úCallable[..., Any]rI   Ú
_MagicSpecrJ   ú
str | Noner[   rÎ   )
rÉ   r^   rJ   r^   rI   Ú
_MagicKindrÊ   rÕ   r[   rÎ   )r+   r,   r-   r.   rh   r   r#   Útagr¸   rœ   r   r’   r   r�   r   r–   r¡   r™   r›   r£   r§   rµ   rº   rÂ   rÅ   rÌ   r/   Ú__classcell__©r�   s   @r1   r‹   r‹   S  s«  ø† ÙJñ ‹V€FÙðñ÷2 
�cØð 
ð ð3 ñ< ‹v€HáØ;Èñ€Eñ ØÐWñç	�c�€cÐð ñ ˆ\Óó-ó ð-ð
 	@ØBð€Lñ
 Ð;ÈÑM€Kð *.ØØ%)ð	Hà&ðHð ðHð #ð	Hð
 ðHð 
÷Hð Hô 2ôð 35ðØðØ,/ðà	"õô46ô$$;ðR "(Ø!%ð	$@à ð$@ð ð$@ð ð	$@ð
 
õ$@ðT "(Ø#'ð#Aàð#Að ð#Að ð	#Að
 !ð#Að 
÷#Aó #Ar0   r‹   c                  ó¬   ^ • \ rS rSr% Sr0 rS\S'   0 rS\S'   SrS\S'   S	r	S
\S'    S     SU 4S jjjr
SS jrSS jr          SS jrSrU =r$ )rA   iM  a³  Base class for implementing magic functions.

Shell functions which can be reached as %function_name. All magic
functions should accept a string, which they can parse for their own
needs. This can make some functions easier to type, eg `%cd ../`
vs. `%cd("../")`

Classes providing magic functions need to subclass this class, and they
MUST:

- Use the method decorators `@line_magic` and `@cell_magic` to decorate
  individual methods as magic functions, AND

- Use the class decorator `@magics_class` to ensure that the magic
  methods are properly registered at the instance level upon instance
  initialization.

See :mod:`magic_functions` for examples of actual implementation classes.
zdict[str, t.Any]Úoptions_tabler#   FrÒ   rC   NzNone | InteractiveShellr’   c                ó>  >• U R                   R                  (       d  [        S5      eUbO  [        US5      (       a  UR                  R                  U 5        [        US5      (       a  UR                  SU5        Xl        0 U l        U R                  n0 U l	        [         Hf  n0 U R                  U'   U R                  U   nX4   nUR                  5        H-  u  px[        U[        5      (       a  [        X5      XW'   M)  X…U'   M/     Mh     [        [         U ]F  " S0 UD6  g )NzMMagics subclass without registration - did you forget to apply @magics_class?Úconfigurablesr�   Úparentr*   )r�   rC   rN   ÚhasattrrÝ   r4   Ú
setdefaultr’   rÛ   r#   r$   r«   r]   r^   rv   rš   rA   r›   )
r”   r’   ÚkwargsÚclass_magicsrÁ   ÚtabÚcls_tabrJ   Ú	meth_namer�   s
            €r1   r›   ÚMagics.__init__k  s   ø€ ð —‘×)×)Üð9óð ð ÑÜ�u˜o×.Ñ.Ø×#Ñ#×*Ñ*¨4Ô0Ü�u˜h×'Ñ'Ø×!Ñ! (¨EÔ2àŒ
ØˆÔð —{‘{ˆØˆŒß ˆEØ!#ˆD�K‰K˜ÑØ"&§+¡+¨eÑ"4ˆCØ&2Ñ&9ˆGØ)0¯©®Ñ%�
Ü˜i¬×-Ñ-ä&-¨dÓ&>�C“Oð '0˜
“Oó *9ñ	 !ô 	Œf�dÒ$Ñ. vÓ.r0   c                óX   • [        S5        [        [        R                  " U5      5        g)z2Print docstring if incorrect arguments were passedzError in arguments:N)Úprintr   Úgetdoc)r”   r?   s     r1   Úarg_errÚMagics.arg_err’  s   € äÐ#Ô$ÜŒh�oŠo˜dÓ#Õ$r0   c                ó*  • [         R                  " S[         R                  5      n[         R                  " S[        -  [         R                  5      n[         R                  " S[        -  [         R                  5      n[         R                  " S[         R                  5      n[         R                  " S5      nUR	                  SU5      nUR	                  SU5      nUR	                  SU5      nUR	                  S	U5      nUR	                  S
U5      nU$ )z$Format a string for latex inclusion.z(%|_|\$|#|&)z	^(%s.*?):z(?P<cmd>%s.+?\b)(?!\}\}:)z\\$z\\nz%\n\\bigskip\n\\texttt{\\textbf{ \1}}:z\\texttt{\g<cmd>}z\\\\z\\\1z\\textbackslash{}n)ÚreÚcompileÚ	MULTILINEr
   Úsub)r”   ÚstrngÚ	escape_reÚcmd_name_reÚcmd_reÚpar_reÚ
newline_res          r1   Úformat_latexÚMagics.format_latex—  sÉ   € ô —J’J˜´·±Ó=ˆ	ä—j’j ´	Ñ!9¼2¿<¹<ÓHˆä—’Ð8¼9ÑDÄbÇlÁlÓSˆä—’˜F¤B§L¡LÓ1ˆô —Z’Z Ó'ˆ
ð —‘Ð HÈ%ÓPˆØ—
‘
Ð/°Ó7ˆØ—
‘
˜7 EÓ*ˆØ—‘˜g uÓ-ˆØ—‘Ð4°eÓ<ˆØˆr0   c                ó–  • [         R                  " S5      R                  R                  nU R                  R                  US5      < SU< 3nUR                  SS5      nUS;  a  [        SU-  5      eUR                  SS	5      nUR                  S
[        R                  S
:H  5      nUR                  SS5      n	UR                  SS5      n
Un0 nUR                  5       n[        U5      S:¼  aŽ  [        XU	5      n [        XâU5      u  pýU Hm  u  nnUS:X  a+  U
(       a$  UR#                  USS5      R#                  USS5      nUR%                  S5      (       a  USS nOUSS n UU   R'                  U5        Mo     [-        U5      nUS:X  a+  U
(       a  UR/                  5       nXý4$ SR!                  U5      nXý4$ ! [         aB  n[        UR                  < SU< SU(       a  SR!                  SU-   5      OS< S35      UeSnAff = f! [(         a    UU   U/UU'    GM  [*         a    U(       a
  U/UU'    GM1  UUU'    GM:  f = f)a´  Parse options passed to an argument string.

The interface is similar to that of :func:`getopt.getopt`, but it
returns a :class:`~IPython.utils.struct.Struct` with the options as keys
and the stripped argument string still as a string.

arg_str is quoted as a true sys.argv vector by using shlex.split.
This allows us to easily expand variables, glob files, quote
arguments, etc.

Parameters
----------
arg_str : str
    The arguments to parse.
opt_str : str
    The options specification.
mode : str, default 'string'
    If given as 'list', the argument string is returned as a list (split
    on whitespace) instead of a string.
list_all : bool, default False
    Put all option values in lists. Normally only options
    appearing more than once are put in a list.
posix : bool, default True
    Whether to split the input line in POSIX mode or not, as per the
    conventions outlined in the :mod:`shlex` module from the standard
    library.
r   rÑ   Ú ÚmodeÚstring)rü   Úlistzincorrect mode given: %sÚlist_allr   ÚposixÚstrictTÚpreserve_non_optsFz (allowed: "Ú")rÑ   Ú)Nz--r   )rt   ru   Úf_codeÚco_namerÛ   rw   rN   ÚosrV   r¬   Úlenr   r   r   r	   ÚmsgÚjoinÚreplaceÚ
startswithr4   ÚAttributeErrorÚKeyErrorr   Úlstrip)r”   Úarg_strÚopt_strÚ	long_optsrU   ry   rû   rþ   rÿ   r   r  Úremainder_arg_strÚodictÚargsÚargvÚoptsÚeÚorT   s                      r1   Úparse_optionsÚMagics.parse_options¯  sF  € ô@ —’˜qÓ!×(Ñ(×0Ñ0ˆØ!×/Ñ/×3Ñ3°F¸BÖ?ÂÐIˆà�v‰v�f˜hÓ'ˆØÐ)Ó)ÜÐ7¸$Ñ>Ó?Ð?à—6‘6˜* aÓ(ˆØ—‘�w¤§¡¨7Ñ 2Ó3ˆØ—‘˜ $Ó'ˆàŸF™FÐ#6¸Ó>ÐØ#Ðð #%ˆØ�}‰}‹ˆÜˆt‹9˜‹>ô ˜W¨VÓ4ˆDðÜ# D°9Ó=‘
�ó ‘��1Ø˜8Ó#Ö(9ð ):×(AÑ(AÀ!ÀRÈÓ(K×(SÑ(SØ˜2˜qó)Ð%ð —<‘< ×%Ñ%Ø˜!˜"˜‘Aà˜!˜"˜�Að%Ø˜!‘H—O‘O AÖ&ñ ô. �e‹}ˆØ�8ÓÞ Ø(×/Ñ/Ó1�ð ˆzÐð —x‘x “~�àˆzÐøôG ó Ü à—u”u›gÆi s§x¡x°¸	Ñ0AÔ'BÐUWÒ'WðYóð ðûðûô& &ó -Ø % a¡¨!˜}�E˜!•HÜó %ÞØ$% 3˜˜a�à#$˜˜a�ð	%ús6   Ã=F= Å&HÆ=
H	Ç=HÈH	ÈIÈ$IÈ>IÉI)r#   rÛ   r’   rS   )r’   rÏ   rá   r   r[   rÎ   )r?   rÓ   r[   rÎ   )rñ   r^   r[   r^   )
r  r^   r  r^   r  r^   rU   r   r[   ztuple[Any, Any])r+   r,   r-   r.   rh   rÛ   Ú__annotations__r#   rC   r’   r›   rê   r÷   r  r/   rØ   rÙ   s   @r1   rA   rA   M  s    ø‡ ñð* ')€MÐ#Ó(à!€FÐÓ!à€J�Óà%)€EÐ"Ó)ð 04ð%/Ø,ð%/Ø?Bð%/à	÷%/ð %/ôN%ô
ð0[Øð[Ø%(ð[Ø69ð[ØADð[à	÷[ò [r0   c                  óD   • \ rS rSrSr S         SS jjrS	S jrSrg)
rÈ   i  aB  An alias to another magic function.

An alias is determined by its magic name and magic kind. Lookup
is done at call time, so if the underlying magic changes the alias
will call the new function.

Use the :meth:`MagicsManager.register_alias` method or the
`%alias_magic` magic function to create and register a new alias.
Nc                óº   • Xl         X l        X@l        X0l        [        U R                     < U R                  < 3U l        SU R
                  -  U l        SU l        g )NzAlias for `%s`.F)r’   rJ   rÊ   rI   r&   Úpretty_targetrh   Ú_in_call)r”   r’   rJ   rI   rÊ   s        r1   r›   ÚMagicAlias.__init__  sL   € ð Œ
Ø$ŒØ(ÔØ$Œä'4°T·_±_Ó'EÀtÇÃÐWˆÔØ(¨4×+=Ñ+=Ñ=ˆŒàˆ�r0   c                ó”  • U R                   R                  U R                  U R                  5      nUc  [	        SU R
                  -  5      eU R                  (       a  [	        S5      eSU l         U R                  (       a.  [        U5      nU R                  S-   US   -   US'   [        U5      nU" U0 UD6SU l        $ ! SU l        f = f)zCall the magic alias.zMagic `%s` not found.zBInfinite recursion detected; magic aliases cannot call themselves.Trú   r   F)
r’   Ú
find_magicrJ   rI   r	   r  r  rÊ   rý   Útuple)r”   r  rá   ÚfnÚ	args_lists        r1   Ú__call__ÚMagicAlias.__call__(  s¸   € à�Z‰Z×"Ñ" 4§?¡?°D·O±OÓDˆØ‰:ÜÐ4°t×7IÑ7IÑIÓJÐJð �=�=ÜØTóð ð ˆŒð	"Ø× × Ü  ›J�	Ø#×0Ñ0°3Ñ6¸¸a¹Ñ@�	˜!‘Ü˜YÓ'�Ù�tÐ&˜vÑ&à!ˆD�Mø˜EˆD�Mús   Á0AB> Â>	C)rh   r  rI   rJ   rÊ   r  r’   rS   )
r’   r   rJ   r^   rI   rÖ   rÊ   rÕ   r[   rÎ   )r  r   rá   r   r[   r   )r+   r,   r-   r.   rh   r›   r&  r/   r*   r0   r1   rÈ   rÈ     sF   † ñð $(ðàðð ðð ð	ð
 !ðð 
õ÷""r0   rÈ   )r6   ú	list[str]r[   r(  )r?   r   r[   r   )rE   r@   r[   r@   )
rH   rÐ   rI   rÔ   rJ   r^   r?   r   r[   rÎ   )rI   r^   r[   rÎ   )rI   rÔ   r[   z-Callable[[_F | str], _F | Callable[[_F], _F]])r…   r   r[   r   )IÚ
__future__r   r  rí   rt   r   r   Útraitlets.config.configurabler   rÑ   r   r   r	   Úinputtransformer2r
   r   Úutils.ipstructr   Úutils.processr   Ú
utils.textr   Ú	traitletsr   r   r   r   ÚloggingÚtypingÚtr   r   r   r   r   ÚTYPE_CHECKINGÚtypesr   ÚIPython.core.interactiveshellr   r   rÖ   rÔ   rD   r#   r  r$   r%   r&   r(   r<   r>   r½   r@   rF   rK   rO   rf   ri   r~   rƒ   rˆ   r†   r‰   Ú
line_magicÚ
cell_magicÚline_cell_magicÚregister_line_magicÚregister_cell_magicÚregister_line_cell_magicr‹   rA   rÈ   r*   r0   r1   Ú<module>r<     sÏ  ðÞ "à +ó 
Û 	Û 
ß &å 6Ý Ý ß 4Ý #Ý %Ý ß 3Ó 3Ý ã ß <Õ <à‡?‡?Ýå>áˆT˜ # s (Ñ+Ñ,€Ø�^Ñ$€
ØÐ0Ñ1€
ñ %)¨b°rÑ$:€Ð!Ó :à&6€Ð#Ó 6Ø%B€
Ð"Ó BÙ'+°ÀÑ'L€Ð$Ó L÷	ñ 	ôô&ñ ˆT˜˜h™Ñ(€ôð2+Ø	"ð+àð+ð ð+ð ð	+ð
 
ô+ô2	
ðÐ ð: Øð à2ô ðF:Øð:à2ô:ðz :Ð ØFÐ ôô ñ " &Ó)€
Ù! &Ó)€
Ù& {Ó3€ñ -¨VÓ4Ð Ù,¨VÓ4Ð Ù1°+Ó>Ð ôtA�Lô tAôt}ˆ\ô }÷~/"ò /"r0   