+
     h)  c                  s    R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
Ht ^RIHt ]P                  R8X  d   R R	 ltM^ R
IHt  ! R R]4      tR R ltR R ltR.tR# )zUnix.)annotationsN)ConfigParser)Path)IteratorNoReturn)PlatformDirsABCZwin32c                   V ^8  d   QhRR/# )   returnr    Zformat   "I/usr/lib/python3.14/site-packages/setuptools/_vendor/platformdirs/unix.py__annotate__r      s        H      c                 s    R p \        V 4      h)zshould only be used on Unix)ZRuntimeError)Zmsgs    r   getuidr      s    +3r   )r   c                  s   ] tR t^tRt]R R l4       t]R R l4       t]R R l4       t]R R	 l4       t	]R
 R l4       t
]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R  R! l4       t]R" R# l4       t]R$ R% l4       t]R& R' l4       t]R( R) l4       t]R* R+ l4       tR, R- ltR. R/ ltR0 R1 ltR2tR3# )4Unixaf  
On Unix/Linux, we follow the `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-
latest.html>`_.

The spec allows overriding directories with environment variables. The examples shown are the default values,
alongside the name of the environment variable that overrides them. Makes use of the `appname
<platformdirs.api.PlatformDirsABC.appname>`, `version <platformdirs.api.PlatformDirsABC.version>`, `multipath
<platformdirs.api.PlatformDirsABC.multipath>`, `opinion <platformdirs.api.PlatformDirsABC.opinion>`, `ensure_exists
<platformdirs.api.PlatformDirsABC.ensure_exists>`.

c               r   r   r   strr	   r
   r   r   r   Unix.__annotate__%   s     7 7s 7r   c                    \         P                  P                  RR4      pVP                  4       '       g    \         P                  P                  R4      pV P                  V4      # )z~
:return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
 ``$XDG_DATA_HOME/$appname/$version``
ZXDG_DATA_HOME z~/.local/shareosenvirongetstrippath
expanduser_append_app_name_and_versionselfr      & r   user_data_dirZUnix.user_data_dir$   sI     zz~~or2zz||77%%&67D0066r   c               r   r   r   z	list[str]r	   r
   r   r   r   r   0   s     V V Vr   c                	s   \         P                  P                  R R4      pVP                  4       '       g   R\         P                   R2pVP                  \         P                  4       Uu. uF  q P                  V4      NK  	  up# u upi )ZXDG_DATA_DIRSr   z/usr/local/sharez
/usr/share)r   r   r   r   pathsepsplitr   r   r   Zp   &  r   _site_data_dirsZUnix._site_data_dirs/   sc    zz~~or2zz||%bjj\<D>Bjj>TU>T11!4>TUUUs   ,Bc               r   r   r	   r
   r   r   r   r   7   s     
% 
%s 
%r   c                    V P                   pV P                  '       g
   V^ ,          # \        P                  P	                  V4      # )a:  
:return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
 enabled and ``XDG_DATA_DIRS`` is set and a multi path the response is also a multi path separated by the
 OS path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
)r'   	multipathr   r#   joinr   Zdirsr    r   site_data_dirZUnix.site_data_dir6   s4     ##~~~7Nzzt$$r   c               r   r   r	   r
   r   r   r   r   D   s     7 7 7r   c                r   )z}
:return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
 ``$XDG_CONFIG_HOME/$appname/$version``
ZXDG_CONFIG_HOMEr   z	~/.configr   r   r    r   user_config_dirZUnix.user_config_dirC   sI     zz~~/4zz||77%%k2D0066r   c               r   r"   r	   r
   r   r   r   r   O   s     V V9 Vr   c                	s    \         P                  P                  R R4      pVP                  4       '       g   RpVP	                  \         P
                  4       Uu. uF  q P                  V4      NK  	  up# u upi )ZXDG_CONFIG_DIRSr   z/etc/xdg)r   r   r   r   r$   r#   r   r%   r&   r   _site_config_dirsZUnix._site_config_dirsN   sW    zz~~/4zz||D>Bjj>TU>T11!4>TUUUs   A6c               r   r   r	   r
   r   r   r   r   V   s     
% 
% 
%r   c                r(   )a  
:return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
 is enabled and ``XDG_CONFIG_DIRS`` is set and a multi path the response is also a multi path separated by
 the OS path separator), e.g. ``/etc/xdg/$appname/$version``
)r.   r)   r   r#   r*   r+   r    r   site_config_dirZUnix.site_config_dirU   s4     %%~~~7Nzzt$$r   c               r   r   r	   r
   r   r   r   r   c        7 7 7r   c                r   )z|
:return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
 ``~/$XDG_CACHE_HOME/$appname/$version``
ZXDG_CACHE_HOMEr   z~/.cacher   r   r    r   user_cache_dirZUnix.user_cache_dirb   sI     zz~~.3zz||77%%j1D0066r   c               r   r   r	   r
   r   r   r   r   n        ? ? ?r   c                s$    V P                  R4      # )zO:return: cache directory shared by users, e.g. ``/var/cache/$appname/$version``z
/var/cache)r   r      &r   site_cache_dirZUnix.site_cache_dirm   s     00>>r   c               r   r   r	   r
   r   r   r   r   s   r0   r   c                r   )z
:return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
 ``$XDG_STATE_HOME/$appname/$version``
ZXDG_STATE_HOMEr   z~/.local/stater   r   r    r   user_state_dirZUnix.user_state_dirr   sJ     zz~~.3zz||77%%&67D0066r   c               r   r   r	   r
   r   r   r   r   ~   s      c r   c                s    V P                   pV P                  '       d2   \        P                  P	                  VR4      pV P                  V4       V# )zg:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in itZlog)r6   Zopinionr   r   r*   Z_optionally_create_directoryr   r    r   user_log_dirZUnix.user_log_dir}   s?     ""<<<77<<e,D--d3r   c               r   r   r	   r
   r   r   r   r      s     G GC Gr   c                    \        RR4      # )zC:return: documents directory tied to the user, e.g. ``~/Documents``ZXDG_DOCUMENTS_DIRz~/Documents_get_user_media_dirr3   r4   r   user_documents_dirZUnix.user_documents_dir   s     ##6FFr   c               r   r   r	   r
   r   r   r   r      s     F FC Fr   c                r8   )zC:return: downloads directory tied to the user, e.g. ``~/Downloads``ZXDG_DOWNLOAD_DIRz~/Downloadsr9   r3   r4   r   user_downloads_dirZUnix.user_downloads_dir   s     ##5}EEr   c               r   r   r	   r
   r   r   r   r      s     E E3 Er   c                r8   )zA:return: pictures directory tied to the user, e.g. ``~/Pictures``ZXDG_PICTURES_DIRz
~/Picturesr9   r3   r4   r   user_pictures_dirZUnix.user_pictures_dir   s     ##5|DDr   c               r   r   r	   r
   r   r   r   r      s     A A Ar   c                r8   )z=:return: videos directory tied to the user, e.g. ``~/Videos``ZXDG_VIDEOS_DIRz~/Videosr9   r3   r4   r   user_videos_dirZUnix.user_videos_dir   s     ##3Z@@r   c               r   r   r	   r
   r   r   r   r      r2   r   c                r8   )z;:return: music directory tied to the user, e.g. ``~/Music``ZXDG_MUSIC_DIRz~/Musicr9   r3   r4   r   user_music_dirZUnix.user_music_dir   s     #?I>>r   c               r   r   r	   r
   r   r   r   r      s     C C# Cr   c                r8   )z?:return: desktop directory tied to the user, e.g. ``~/Desktop``ZXDG_DESKTOP_DIRz	~/Desktopr9   r3   r4   r   user_desktop_dirZUnix.user_desktop_dir   s     ##4kBBr   c               r   r   r	   r
   r   r   r   r      s     7 7# 7r   c                sh   \         P                  P                  RR4      pVP                  4       '       gm   \        P
                  P                  R4      '       d;   R\        4        2p\        V4      P                  4       '       g   R\        4        2pMR\        4        2pV P                  V4      # )aJ  
:return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
 ``$XDG_RUNTIME_DIR/$appname/$version``.

 For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/user/$(id -u)/$appname/$version`` if
 exists, otherwise ``/tmp/runtime-$(id -u)/$appname/$version``, if``$XDG_RUNTIME_DIR``
 is not set.
XDG_RUNTIME_DIRr   z/var/run/user/z/tmp/runtime-z
/run/user/ZfreebsdZopenbsdZnetbsd)r   r   r   r   sysplatform
startswithr   r   existsr   r   r    r   user_runtime_dirZUnix.user_runtime_dir   s     zz~~/4zz||||&&'GHH'z2Dz((***68*5D#FH:.0066r   c               r   r   r	   r
   r   r   r   r      s     7 7# 7r   c                s    \         P                  P                  RR4      pVP                  4       '       g+   \        P
                  P                  R4      '       d   RpMRpV P                  V4      # )a5  
:return: runtime directory shared by users, e.g. ``/run/$appname/$version`` or         ``$XDG_RUNTIME_DIR/$appname/$version``.

Note that this behaves almost exactly like `user_runtime_dir` if ``$XDG_RUNTIME_DIR`` is set, but will
fall back to paths associated to the root user instead of a regular logged-in user if it's not set.

If you wish to ensure that a logged-in root user path is returned e.g. ``/run/user/0``, use `user_runtime_dir`
instead.

For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/$appname/$version`` if ``$XDG_RUNTIME_DIR`` is not set.
rA   r   z/var/runz/runrB   )r   r   r   r   rC   rD   rE   r   r   r    r   site_runtime_dirZUnix.site_runtime_dir   sU     zz~~/4zz||||&&'GHH!0066r   c               r   r   r   r   r	   r
   r   r   r   r      s     I I Ir   c                8    V P                  V P                  4      # )zh:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``) _first_item_as_path_if_multipathr,   r3   r4   r   site_data_pathZUnix.site_data_path   s     44T5G5GHHr   c               r   rI   r	   r
   r   r   r   r      s     K K$ Kr   c                rJ   )zj:return: config path shared by the users, returns the first item, even if ``multipath`` is set to ``True``)rK   r/   r3   r4   r   site_config_pathZUnix.site_config_path   s     44T5I5IJJr   c               r   rI   r	   r
   r   r   r   r      s     J J Jr   c                rJ   )zi:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``)rK   r5   r3   r4   r   site_cache_pathZUnix.site_cache_path   s     44T5H5HIIr   c                    V ^8  d   QhRRRR/# )r   	directoryr   r   r   r	   r
   r   r   r   r      s      # $ r   c                	s    V P                   '       d'   VP                  \        P                  4      ^ ,          p\	        V4      # )i    )r)   r$   r   r#   r   )r   rP   s   &&r   rK   Z%Unix._first_item_as_path_if_multipath   s,    >>>!

3A6IIr   c               r   r   r   zIterator[str]r	   r
   r   r   r   r      s     * *- *r   c              #  V   "   V P                   x  V P                   Rj  xL
  R#  L5i)z4:yield: all user and site configuration directories.N)r-   r.   r3   r4   r   iter_config_dirsZUnix.iter_config_dirs   s      """))))   )')c               r   rQ   r	   r
   r   r   r   r      s     ( ( (r   c              #  rR   )z+:yield: all user and site data directories.N)r!   r'   r3   r4   r   iter_data_dirsZUnix.iter_data_dirs   s         ''''rT   r	   N)Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__Zpropertyr!   r'   r,   r-   r.   r/   r1   r5   r6   r7   r;   r<   r=   r>   r?   r@   rG   rH   rL   rM   rN   rK   rS   rU   Z__static_attributes__r	   r   r   r   r      s   
 7 7 V V 
% 
% 7 7 V V 
% 
% 7 7 ? ? 7 7   G G F F E E A A ? ? C C 7 7& 7 7* I I K K J J*
( (r   r   c               s$    V ^8  d   QhRRRRRR/# )r   env_varr   fallback_tilde_pathr   r	   r
   r   r   r   r      s!       3 3 r   c                s    \        V 4      pVfV   \        P                  P                  V R4      P	                  4       pV'       g    \        P
                  P                  V4      pV# )Nr   )_get_user_dirs_folderr   r   r   r   r   r   )rW   rX   Z	media_dirs   && r   r:   r:      sM    %g.IJJNN7B/557	**+>?Ir   c               rO   )r   keyr   r   z
str | Noner	   r
   r   r   r   r      s      s z r   c                s   \        \        4       P                  4      R,          pVP                  4       '       d   \	        4       pVP                  4       ;_uu_ 4       pVP                  RVP                  4        24       RRR4       WR,          9  d   R# VR,          V ,          P                  R4      pVP                  R\        P                  P                  R4      4      # R#   + '       g   i     Lo; i)zo
Return directory from user-dirs.dirs config file.

See https://freedesktop.org/wiki/Software/xdg-user-dirs/.

zuser-dirs.dirsz[top]
NZtopZ"z$HOMEZ~)r   r   r-   rF   r   ZopenZread_stringZreadr   Zreplacer   r   r   )rZ   Zuser_dirs_config_pathZparserZstreamr   s   &    r   rY   rY      s     !!7!78;KK##%%"''))V89 * Um#e}S!'',||GRWW%7%7%<== *)s   #C''C7	)rV   Z
__future__r    r   rC   Zconfigparserr   Zpathlibr   Ztypingr   r   Zapir   rD   r   r   r:   rY   Z__all__r	   r   r   <module>r[      sX     " 	 
 %  %  <<7 
 T(? T(n4 r   