+
     hH  c                   s  a  R. t'0 t ^ RIt^ RIt^ RIt^ RIHt ^RIHt ^RIH	t	 ^RIH
t
 ^RIHt ^RIHt ^RIHt ^R	IHt ^R
IHt ^RIHt R R lt ! R R4      tRtRtRt ! R R4      t ! R R]4      t ! R R]4      t ! R R]4      t]P8                  ! R]P:                  ],          R7      tR]R]R]/t] ^ k R/R  R! llt R" R# lt!R$ R% lt"R& R' lt#R( R) lt$R* R+ lt%R, R- lt&R# )0    N)gettext)Argument)BaseCommand)Context)MultiCommand)Option)	Parameter)ParameterSource)split_arg_string)echoc                s    V ^8  d   QhR\         R\        P                  \        \        P                  3,          R\        R\        R\        R\
        /# )   clictx_args	prog_namecomplete_varinstructionreturn)r   tMutableMappingstrAnyintformat   ";/usr/lib/python3.14/site-packages/click/shell_completion.py__annotate__r      sW     # #	#sAEEz*# # 	#
 # 	#    c                s    VP                  R4      w  rVp\        V4      pVf   ^# V! WW#4      pVR8X  d   \        VP                  4       4       ^ # VR8X  d   \        VP	                  4       4       ^ # ^# )a  Perform shell completion for the given CLI program.

:param cli: Command being called.
:param ctx_args: Extra arguments to pass to
    ``cli.make_context``.
:param prog_name: Name of the executable in the shell.
:param complete_var: Name of the environment variable that holds
    the completion instruction.
:param instruction: Value of ``complete_var`` with the completion
    instruction and shell, in the form ``instruction_shell``.
:return: Status code to exit with.
_sourcecomplete)	partitionget_completion_classr
   r   r   )	r   r   r   r   r   shellr   Zcomp_clsZcomps	   &&&&&    r   shell_completer#      sm    & (11#6Ek#E*HC9;DhT[[]j T]]_r   c                   sP   a  ] tR t^7t o RtRtR	V 3R lR lltV 3R lR ltRtV t	R# )
CompletionItema  Represents a completion value and metadata about the value. The
default metadata is ``type`` to indicate special shell handling,
and ``help`` if a shell supports showing a help string next to the
value.

Arbitrary parameters can be passed when creating the object, and
accessed using ``item.attr``. If an attribute wasn't passed,
accessing it returns ``None``.

:param value: The completion suggestion.
:param type: Tells the shell script to provide special completion
    support for the type. Click uses ``"dir"`` and ``"file"``.
:param help: String shown next to the value if supported.
:param kwargs: Arbitrary metadata. The built-in implementations
    don't use this, but custom type completions paired with custom
    shell support could use it.
Nc          
      s   < V ^8  d   QhRS[ P                  RS[RS[ P                  S[,          RS[ P                  RR/# )r   valuetypehelpkwargsr   N)r   r   r   Optionalr   __classdict__   "r   r   CompletionItem.__annotate__L   sM     
 
uu
 
 jjo	

 %%
 

r   c                6    Wn         W n        W0n        W@n        R # Nr%   r&   r'   _info)selfr%   r&   r'   r(   s   &&&&,r   __init__ZCompletionItem.__init__L   s     "
	%)	
r   c                s:   < V ^8  d   QhRS[ RS[P                  /# )r   namer   )r   r   r   r*   r,   r   r   r-   X   s     $ $ $ $r   c                s8    V P                   P                  V4      # r/   )r1   get)r2   r4      &&r   __getattr__ZCompletionItem.__getattr__X   s    zz~~d##r   )r1   r'   r&   r%   r0   )ZplainN)
__name__
__module____qualname____firstlineno____doc__Z	__slots__r3   r7   __static_attributes____classdictcell__r+      @r   r$   r$   7   s%     $ 3I
 
$ $r   r$   a  %(complete_func)s() {
    local IFS=$'\n'
    local response

    response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD %(complete_var)s=bash_complete $1)

    for completion in $response; do
        IFS=',' read type value <<< "$completion"

        if [[ $type == 'dir' ]]; then
            COMPREPLY=()
            compopt -o dirnames
        elif [[ $type == 'file' ]]; then
            COMPREPLY=()
            compopt -o default
        elif [[ $type == 'plain' ]]; then
            COMPREPLY+=($value)
        fi
    done

    return 0
}

%(complete_func)s_setup() {
    complete -o nosort -F %(complete_func)s %(prog_name)s
}

%(complete_func)s_setup;
a  #compdef %(prog_name)s

%(complete_func)s() {
    local -a completions
    local -a completions_with_descriptions
    local -a response
    (( ! $+commands[%(prog_name)s] )) && return 1

    response=("${(@f)$(env COMP_WORDS="${words[*]}" COMP_CWORD=$((CURRENT-1)) %(complete_var)s=zsh_complete %(prog_name)s)}")

    for type key descr in ${response}; do
        if [[ "$type" == "plain" ]]; then
            if [[ "$descr" == "_" ]]; then
                completions+=("$key")
            else
                completions_with_descriptions+=("$key":"$descr")
            fi
        elif [[ "$type" == "dir" ]]; then
            _path_files -/
        elif [[ "$type" == "file" ]]; then
            _path_files -f
        fi
    done

    if [ -n "$completions_with_descriptions" ]; then
        _describe -V unsorted completions_with_descriptions -U
    fi

    if [ -n "$completions" ]; then
        compadd -U -V unsorted -a completions
    fi
}

if [[ $zsh_eval_context[-1] == loadautofunc ]]; then
    # autoload from fpath, call function directly
    %(complete_func)s "$@"
else
    # eval/source/. command, register function for later
    compdef %(complete_func)s %(prog_name)s
fi
af  function %(complete_func)s;
    set -l response (env %(complete_var)s=fish_complete COMP_WORDS=(commandline -cp) COMP_CWORD=(commandline -t) %(prog_name)s);

    for completion in $response;
        set -l metadata (string split "," $completion);

        if test $metadata[1] = "dir";
            __fish_complete_directories $metadata[2];
        else if test $metadata[1] = "file";
            __fish_complete_path $metadata[2];
        else if test $metadata[1] = "plain";
            echo $metadata[2];
        end;
    end;
end;

complete --no-files --command %(prog_name)s --arguments "(%(complete_func)s)";
c                   s   a  ] tR t^t o Rt  V 3R lR lt]V 3R lR l4       tV 3R lR ltV 3R lR	 lt	V 3R
 lR lt
V 3R lR ltV 3R lR ltV 3R lR ltV 3R ltRtV tR# )ShellCompletea  Base class for providing shell completion support. A subclass for
a given shell will override attributes and methods to implement the
completion instructions (``source`` and ``complete``).

:param cli: Command being called.
:param prog_name: Name of the executable in the shell.
:param complete_var: Name of the environment variable that holds
    the completion instruction.

.. versionadded:: 8.0
c          
      st   < V ^8  d   QhRS[ RS[P                  S[S[P                  3,          RS[RS[RR/# )r   r   r   r   r   r   N)r   r   r   r   r   r*   r,   r   r   ShellComplete.__annotate__   sP     
) 
)
) ""3:.
) 	
)
 
) 

)r   c                r.   r/   )r   r   r   r   )r2   r   r   r   r   s   &&&&&r   r3   ZShellComplete.__init__   s      "(r   c                    < V ^8  d   QhRS[ /# r   r   r   r*   r,   r   r   rB      s     * *3 *r   c                s    \         P                  ! RRV P                  P                  RR4      \         P                  R7      pRV R2# )zAThe name of the shell function defined by the completion
script.
z\W* Z-r   )ZflagsZ_completion)reZsubr   ZreplaceZASCII)r2   Z	safe_names   & r   	func_nameZShellComplete.func_name   s<    
 FF62t~~'='=c3'GrxxX	9+[))r   c                s^   < V ^8  d   QhRS[ P                  S[S[ P                  3,          /# rD   )r   Dictr   r   r*   r,   r   r   rB      s%     

 

QVVCJ/ 

r   c                sN    RV P                   RV P                  RV P                  /# )zVars for formatting :attr:`source_template`.

By default this provides ``complete_func``, ``complete_var``,
and ``prog_name``.
Zcomplete_funcr   r   )rH   r   r   r2      &r   source_varsZShellComplete.source_vars   s+     T^^D--
 	
r   c                rC   rD   rE   r*   r,   r   r   rB      s     9 9 9r   c                sD    V P                   V P                  4       ,          # )zProduce the shell script that defines the completion
function. By default this ``%``-style formats
:attr:`source_template` with the dict returned by
:meth:`source_vars`.
)source_templaterL   rJ   rK   r   r   ZShellComplete.source   s     ##d&6&6&888r   c                n   < V ^8  d   QhRS[ P                  S[ P                  S[,          S[3,          /# rD   r   TupleListr   r*   r,   r   r   rB      s*     " "QWWQVVC[#-=%> "r   c                    \         h)zUse the env vars defined by the shell script to return a
tuple of ``args, incomplete``. This must be implemented by
subclasses.
ZNotImplementedErrorrJ   rK   r   get_completion_argsZ!ShellComplete.get_completion_args   s
    
 "!r   c                st   < V ^8  d   QhRS[ P                  S[,          RS[RS[ P                  S[,          /# )r   args
incompleter   )r   rQ   r   r$   r*   r,   r   r   rB     s6     3 3FF3K3-03	
	3r   c                s    \        V P                  V P                  V P                  V4      p\	        W1V4      w  rBVP                  W24      # )a,  Determine the context and last complete command or parameter
from the complete args. Call that object's ``shell_complete``
method to get the completions for the incomplete value.

:param args: List of complete args before the incomplete value.
:param incomplete: Value being completed. May be empty.
)_resolve_contextr   r   r   _resolve_incompleter#   )r2   rU   rV   ctxZobjs   &&&  r   get_completionsZShellComplete.get_completions  s?     txxM-cD!!#22r   c                &   < V ^8  d   QhRS[ RS[/# r   itemr   r$   r   r*   r,   r   r   rB     s     " "n " "r   c                rR   )zFormat a completion item into the form recognized by the
shell script. This must be implemented by subclasses.

:param item: Completion item to format.
rS   r2   r]   r6   r   format_completionZShellComplete.format_completion  s
     "!r   c                rC   rD   rE   r*   r,   r   r   rB     s     
 
# 
r   c                s    V P                  4       w  rV P                  W4      pV Uu. uF  q@P                  V4      NK  	  ppRP                  V4      # u upi )zProduce the completion data to send back to the shell.

By default this calls :meth:`get_completion_args`, gets the
completions, then calls :meth:`format_completion` for each
completion.

)rT   rZ   r`   Zjoin)r2   rU   rV   Zcompletionsr]   Zouts   &     r   r   ZShellComplete.complete  sV      335**4<8CD%%d+Dyy~ Es   Ac                sz   < V ^8  d   Qh/ S[ P                  S[,          ;R&   S[ P                  S[,          ;R&   # )r   r4   rM   )r   ZClassVarr   r*   r,   r   r   rB      s/      **S/ & ZZ_$' r   )r   r   r   r   N)r8   r9   r:   r;   r<   r3   ZpropertyrH   rL   r   rT   rZ   r`   r   Z__annotate_func__r=   r>   r?   r@   r   rA   rA      sv     

) 
) * *

 

9 9" "3 3" "
 
{  r   rA   c                   s   a a ] tR tRt oRtRt]t]V3R lR l4       t	V3R lV 3R llt
V3R lR	 ltV3R
 lR ltRtVtV ;t# )BashCompletei*  zShell completion for Bash.bashc                s   < V ^8  d   QhRR/# )r   r   N r*   r,   r   r   BashComplete.__annotate__1  s      D r   c                 sd   ^ RI p V P                  . R	OV P                  R7      p\        P                  ! RVP
                  P                  4       4      pVeD   VP                  4       w  r4VR8  g   VR8X  d"   VR8  d   \        \        R4      RR7       R# R# R# \        \        R4      RR7       R# )
r    N)stdoutz^(\d+)\.(\d+)\.\d+Z4zCShell completion is not supported for Bash versions older than 4.4.T)Zerrz@Couldn't detect Bash version, shell completion is not supported.)rc   z-czecho "${BASH_VERSION}")

subprocessZrunZPIPErG   Zsearchrf   ZdecodeZgroupsr
   r   )rg   ZoutputZmatchZmajorZminors        r   _check_versionZBashComplete._check_version0  s    4Z__   
 		/1E1E1GH <<>LEs{eslus{4  0;l TUr   c                rC   rD   rE   r*   r,   r   r   re   J  s          r   c                s@   < V P                  4        \        SV `	  4       # r/   )rh   Zsuperr   )r2   	__class__s   &r   r   ZBashComplete.sourceJ  s    w~r   c                rN   rD   rO   r*   r,   r   r   re   N  *     
  
 QWWQVVC[#-=%> 
 r   c                    \        \        P                  R ,          4      p\        \        P                  R,          4      pV^V p W,          pW43#   \         d    Rp Y43# i ; i
COMP_WORDS
COMP_CWORDrF   r	   osenvironr   Z
IndexErrorr2   cwordsZcwordrU   rV      &    r   rT   Z BashComplete.get_completion_argsN  i    !"**\":;BJJ|,-a	J   	J	   A A$#A$c                r[   r\   r^   r*   r,   r   r   re   Z  s     + +n + +r   c                s8    VP                    R VP                   2# ),)r&   r%   r_   r6   r   r`   ZBashComplete.format_completionZ  s    ))Adjj\**r   rd   )r8   r9   r:   r;   r<   r4   _SOURCE_BASHrM   Zstaticmethodrh   r   rT   r`   r=   r>   Z__classcell__)ri   r+   s   @@r   rb   rb   *  sG     $D"O 2   
  
 + + +r   rb   c                   P   a  ] tR tRt o RtRt]tV 3R lR ltV 3R lR lt	Rt
V tR	# )
ZshCompletei^  zShell completion for Zsh.zshc                rN   rD   rO   r*   r,   r   r   ZshComplete.__annotate__d  rj   r   c                rk   rl   ro   rr   rt   r   rT   ZZshComplete.get_completion_argsd  ru   rv   c                r[   r\   r^   r*   r,   r   r   r|   p  s     O On O Or   c                s~    VP                    R VP                   R VP                  '       d   VP                   2# R 2# )ra   r   )r&   r%   r'   r_   r6   r   r`   ZZshComplete.format_completionp  s9    ))Btzzl"$)))TYY,MNN,MNNr   rd   N)r8   r9   r:   r;   r<   r4   _SOURCE_ZSHrM   rT   r`   r=   r>   r?   r@   r   rz   rz   ^  s(     #D!O
  
 O Or   rz   c                   ry   )
FishCompleteit  zShell completion for Fish.fishc                rN   rD   rO   r*   r,   r   r   FishComplete.__annotate__z  rj   r   c                s    \        \        P                  R ,          4      p\        P                  R,          pVR,          pV'       d'   V'       d   VR,          V8X  d   VP                  4        W23# )rm   rn   :i   NN)r	   rp   rq   Zpop)r2   rs   rV   rU   s   &   r   rT   Z FishComplete.get_completion_argsz  sP    !"**\":;ZZ-
bz $48z#9HHJr   c                r[   r\   r^   r*   r,   r   r   r     s     + +n + +r   c                s    VP                   '       d)   VP                   R VP                   RVP                    2# VP                   R VP                   2# )rw   Z	)r'   r&   r%   r_   r6   r   r`   ZFishComplete.format_completion  sG    999ii[$**R		{;;))Adjj\**r   rd   N)r8   r9   r:   r;   r<   r4   _SOURCE_FISHrM   rT   r`   r=   r>   r?   r@   r   r~   r~   t  s&     $D"O
  
 + +r   r~   ShellCompleteType)Zboundrc   r   r{   c                sf    V ^8  d   QhR\         R\        P                  \        ,          R\         /# )r   clsr4   r   )r   r   r)   r   r   r   r   r   r     s,      	"#**S/r   c                s8    Vf   V P                   pV \        V&   V # )aQ  Register a :class:`ShellComplete` subclass under the given name.
The name will be provided by the completion instruction environment
variable during completion.

:param cls: The completion class that will handle completion for the
    shell.
:param name: Name to register the class under. Defaults to the
    class's ``name`` attribute.
)r4   _available_shells)r   r4   r6   r   add_completion_classr     s"     |xx!dJr   c                s    V ^8  d   QhR\         R\        P                  \        P                  \        ,          ,          /# )r   r"   r   )r   r   r)   TyperA   r   r   r   r   r     s,     ( ( (

166-3H(I (r   c                s,    \         P                  V 4      # )zLook up a registered :class:`ShellComplete` subclass by the name
provided by the completion instruction environment variable. If the
name isn't registered, returns ``None``.

:param shell: Name the class is registered under.
)r   r5   )r"   rK   r   r!   r!     s       ''r   c                <    V ^8  d   QhR\         R\        R\        /# )r   rY   paramr   )r   r   boolr   r   r   r   r     s!        t r   c                s   \        V\        4      '       g   R# VP                  f   Q hV P                  P	                  VP                  4      pVP
                  R8H  ;'       g    V P                  VP                  4      \        P                  J;'       gN    VP
                  ^8  ;'       d7    \        V\        \        34      ;'       d    \        V4      VP
                  8  # )zDetermine if the given parameter is an argument that can still
accept values.

:param ctx: Invocation context for the command represented by the
    parsed complete args.
:param param: Argument object being checked.
Fr   )
isinstancer   r4   paramsr5   nargsZget_parameter_sourcer   ZCOMMANDLINEZtupleZlistZlen)rY   r   r%      && r   _is_incomplete_argumentr     s     eX&&::!!!JJNN5::&Er 	
 	
##EJJ/7R7RR	
 	
 KK!O ) )55$-0) )E
U[[(r   c                r   )r   rY   r%   r   )r   r   r   r   r   r   r   r     s!     " "' "# "$ "r   c                sD    V'       g   R# V^ ,          pW P                   9   # )z5Check if the value looks like the start of an option.F)Z_opt_prefixes)rY   r%   Zcr   r   _start_of_optionr     s     aA!!!!r   c                sr    V ^8  d   QhR\         R\        P                  \        ,          R\        R\
        /# )r   rY   rU   r   r   )r   r   rQ   r   r   r   r   r   r   r   r     s7     A Aw AaffSk A) APT Ar   c                sN   \        V\        4      '       g   R# VP                  '       g   VP                  '       d   R# Rp\	        \        V4      4       F4  w  rEV^,           VP                  8  d    M\        W4      '       g   K2  TpK6  	  VRJ;'       d    W2P                  9   # )zDetermine if the given parameter is an option that needs a value.

:param args: List of complete args before the incomplete value.
:param param: Option object being checked.
FN)	r   r   Zis_flagZcountZ	enumerateZreversedr   r   Zopts)rY   rU   r   Zlast_optionZindexZargs   &&&   r   _is_incomplete_optionr     s     eV$$}}}K/
19u{{"C%%K 0 d"@@{jj'@@r   c          
      s    V ^8  d   QhR\         R\        P                  \        \        P                  3,          R\        R\        P
                  \        ,          R\        /# )r   r   r   r   rU   r   )r   r   r   r   r   rQ   r   r   r   r   r   r     sU     6 6	6sAEEz*6 6 &&+	6
 6r   c           	     sr   RVR&   V P                   ! W#P                  4       3/ VB pVP                  VP                  ,           pV'       d   VP                  p\        V\        4      '       d   VP                  '       gN   VP                  WC4      w  rgpVf   V# VP                  WcVRR7      pVP                  VP                  ,           pK  TpV'       d@   VP                  WC4      w  rgpVf   V# VP                  VVVRRRR7      pVP                  pKG  Tp. VP                  OVP                  OpK   V# V# )aH  Produce the context hierarchy starting with the command and
traversing the complete arguments. This only follows the commands,
it doesn't trigger input prompts or callbacks.

:param cli: Command being called.
:param prog_name: Name of the executable in the shell.
:param args: List of complete args before the incomplete value.
Tresilient_parsing)parentr   F)r   Zallow_extra_argsZallow_interspersed_argsr   )	Zmake_contextZcopyZprotected_argsrU   commandr   r   ZchainZresolve_command)	r   r   r   rU   rY   r   r4   ZcmdZsub_ctxs	   &&&&     r   rW   rW     s,    %)H !


9iik
>X
>C(D
++g|,,===")"9"9#"D4;J&&t#QU&V))CHH4&-&=&=c&HODt{"
!..")-05*. / G #<<D?//?',,?J3Jr   c                s    V ^8  d   QhR\         R\        P                  \        ,          R\        R\        P                  \        P
                  \        \        3,          \        3,          /# )r   rY   rU   rV   r   )r   r   rQ   r   rP   ZUnionr   r   r   r   r   r   r   (  sP     ,# ,#	,#s,#14,#WWQWW[)+,c12,#r   c                s   VR8X  d   RpM=RV9   d7   \        W4      '       d&   VP                  R4      w  r4pVP                  V4       RV9  d    \        W4      '       d   V P                  V3# V P                  P	                  V 4      pV F  p\        WV4      '       g   K  Wb3u # 	  V F  p\        W4      '       g   K  Wb3u # 	  V P                  V3# )aP  Find the Click object that will handle the completion of the
incomplete value. Return the object and the incomplete value.

:param ctx: Invocation context for the command represented by
    the parsed complete args.
:param args: List of complete args before the incomplete value.
:param incomplete: Value being completed. May be empty.
Z=rF   z--)r   r    Zappendr   Z
get_paramsr   r   )rY   rU   rV   r4   r   r   r   s   &&&    r   rX   rX   (  s     S
	
	/@@(2237D 4,S=={{J&&[[##C(F  E22$$  "3..$$  ;;
""r   c                s    V ^8  d   Qh/ ^ \         9   d:   \        P                  \        \        P                  \
        ,          3,          ;R&   # )r   r   )__conditional_annotations__r   rI   r   r   rA   r   r   r   r   r      s5    		^ 166#qvvm445 _ 
r   r/   )(r   rp   rG   Ztypingr   r   r   Zcorer   r   r   r   r   r   r   Zparserr	   Zutilsr
   r#   r$   rx   r}   r   rA   rb   rz   r~   ZTypeVarr   r   r   r   r!   r   r   r   rW   rX   r   )r   r@   r   <module>r      s    		 	          ! $ #L"$ "$L@*X.g gT1+= 1+hO- O,+= +2 II19NO  L
L	;9  ((2"A06r,#r   