Ë
    Ñ—ÄjØ  ã                  óÎ   — U d Z ddlmZ ddlZddlZddlmZ ddlmZm	Z	 ddl
mZ  G d„ d	e«      Z G d
„ dee«      Z ej                  dej                  «      Zded<   dd„ZdgZy)zmacOS.é    )ÚannotationsN)ÚFinalé   )ÚXDGMixinÚ_expand_user)ÚPlatformDirsABCc                  ó  — e Zd ZdZd!d„Zd"d„Zed!d„«       Zed"d„«       Zed!d„«       Z	ed"d„«       Z
ed!d„«       Zed"d	„«       Zed!d
„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed!d„«       Zed"d„«       Z ed!d„«       Z!ed!d„«       Z"y )#Ú_MacOSDefaultsaˆ  Default platform directories for macOS without XDG environment variable overrides.

    Follows the guidance from `Apple's File System Programming Guide
    <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
    The XDG env var handling is in :class:`~platformdirs._xdg.XDGMixin`.

    c                ó:   — | j                  t        d«      d¬«      S )Nz~/Library/Application SupportT©Úprivate©Ú_append_app_name_and_versionr   ©Úselfs    úWC:\Users\pivot\Documents\cueki\casual-preloader\Lib\site-packages\platformdirs/macos.pyÚ_base_user_app_support_dirz)_MacOSDefaults._base_user_app_support_dir   s   € Ø×0Ñ0´Ð>]Ó1^ÐhlÐ0ÓmÐmó    c                óŒ   — t        «       x}r| j                  |› d�«      gng }|j                  | j                  d«      «       |S )Nz/sharez/Library/Application Support©Ú_homebrew_prefixÚ_join_app_name_and_versionÚappend©r   ÚprefixÚ	path_lists      r   Ú_base_site_dirsz_MacOSDefaults._base_site_dirs   sL   € ÜWgÓWiÐMiÈVÐMi�T×4Ñ4¸°x¸vÐ5FÓGÑHÐprˆ	Ø×Ñ˜×8Ñ8Ð9WÓXÔYØÐr   c                ó"   — | j                  «       S )zZData directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``.©r   r   s    r   Úuser_data_dirz_MacOSDefaults.user_data_dir   ó   € ð ×.Ñ.Ó0Ð0r   c                ó"   — | j                  «       S ©N©r   r   s    r   Ú_site_data_dirsz_MacOSDefaults._site_data_dirs#   ó   € à×#Ñ#Ó%Ð%r   c                ó"   — | j                  «       S )z;Config directory tied to the user, same as `user_data_dir`.r   r   s    r   Úuser_config_dirz_MacOSDefaults.user_config_dir'   r!   r   c                ó"   — | j                  «       S r#   r$   r   s    r   Ú_site_config_dirsz _MacOSDefaults._site_config_dirs,   r&   r   c                ó:   — | j                  t        d«      d¬«      S )zNCache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``.z~/Library/CachesTr   r   r   s    r   Úuser_cache_dirz_MacOSDefaults.user_cache_dir0   s!   € ð ×0Ñ0´Ð>PÓ1QÐ[_Ð0Ó`Ð`r   c                óŒ   — t        «       x}r| j                  |› d�«      gng }|j                  | j                  d«      «       |S )Nz
/var/cachez/Library/Cachesr   r   s      r   Ú_site_cache_dirsz_MacOSDefaults._site_cache_dirs5   sM   € ä[kÓ[mÐQmÐQWÐQm�T×4Ñ4¸°x¸zÐ5JÓKÑLÐtvˆ	Ø×Ñ˜×8Ñ8Ð9JÓKÔLØÐr   c                ó8   — | j                  | j                  «      S )aë  Cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``. If we're using a Python binary managed by `Homebrew <https://brew.sh>`_, the directory will be under the Homebrew prefix, e.g. ``$homebrew_prefix/var/cache/$appname/$version``. If `multipath <platformdirs.api.PlatformDirsABC.multipath>` is enabled, and we're in Homebrew, the response is a multi-path string separated by ":", e.g. ``$homebrew_prefix/var/cache/$appname/$version:/Library/Caches/$appname/$version``.)Ú_select_site_dirsr.   r   s    r   Úsite_cache_dirz_MacOSDefaults.site_cache_dir;   s   € ð ×%Ñ% d×&;Ñ&;Ó<Ð<r   c                ó"   — | j                  «       S )z�State directory tied to the user, same as `user_data_dir` without ``$XDG_DATA_HOME``, e.g. ``~/Library/Application Support/$appname/$version``.r   r   s    r   Úuser_state_dirz_MacOSDefaults.user_state_dir@   r!   r   c                óR   — | j                  «       d   }| j                  |d¬«       |S )z¢State directory shared by users, the first entry of `site_data_dir` without ``$XDG_DATA_DIRS``, ignoring `multipath <platformdirs.api.PlatformDirsABC.multipath>`.r   Fr   )r   Ú_optionally_create_directory)r   Úpaths     r   Úsite_state_dirz_MacOSDefaults.site_state_dirE   s/   € ð ×#Ñ#Ó% aÑ(ˆØ×)Ñ)¨$¸Ð)Ô>Øˆr   c                ó:   — | j                  t        d«      d¬«      S )zJLog directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``.z~/Library/LogsTr   r   r   s    r   Úuser_log_dirz_MacOSDefaults.user_log_dirL   s!   € ð ×0Ñ0´Ð>NÓ1OÐY]Ð0Ó^Ð^r   c                ó(   — | j                  dd¬«      S )zHLog directory shared by users, e.g. ``/Library/Logs/$appname/$version``.z/Library/LogsFr   )r   r   s    r   Úsite_log_dirz_MacOSDefaults.site_log_dirQ   s   € ð ×0Ñ0°È%Ð0ÓPÐPr   c                ó   — t        d«      S )z;Documents directory tied to the user, e.g. ``~/Documents``.z~/Documents©r   r   s    r   Úuser_documents_dirz!_MacOSDefaults.user_documents_dirV   ó   € ô ˜MÓ*Ð*r   c                ó   — t        d«      S )z;Downloads directory tied to the user, e.g. ``~/Downloads``.z~/Downloadsr=   r   s    r   Úuser_downloads_dirz!_MacOSDefaults.user_downloads_dir[   r?   r   c                ó   — t        d«      S )z9Pictures directory tied to the user, e.g. ``~/Pictures``.z
~/Picturesr=   r   s    r   Úuser_pictures_dirz _MacOSDefaults.user_pictures_dir`   ó   € ô ˜LÓ)Ð)r   c                ó   — t        d«      S )z5Videos directory tied to the user, e.g. ``~/Movies``.z~/Moviesr=   r   s    r   Úuser_videos_dirz_MacOSDefaults.user_videos_dire   ó   € ô ˜JÓ'Ð'r   c                ó   — t        d«      S )z3Music directory tied to the user, e.g. ``~/Music``.z~/Musicr=   r   s    r   Úuser_music_dirz_MacOSDefaults.user_music_dirj   s   € ô ˜IÓ&Ð&r   c                ó   — t        d«      S )z7Desktop directory tied to the user, e.g. ``~/Desktop``.z	~/Desktopr=   r   s    r   Úuser_desktop_dirz_MacOSDefaults.user_desktop_diro   s   € ô ˜KÓ(Ð(r   c                ó   — t        d«      S )z9Projects directory tied to the user, e.g. ``~/Projects``.z
~/Projectsr=   r   s    r   Úuser_projects_dirz _MacOSDefaults.user_projects_dirt   rD   r   c                ó   — t        d«      S )z;Public share directory tied to the user, e.g. ``~/Public``.z~/Publicr=   r   s    r   Úuser_publicshare_dirz#_MacOSDefaults.user_publicshare_diry   rG   r   c                ó   — t        d«      S )z;Templates directory tied to the user, e.g. ``~/Templates``.z~/Templatesr=   r   s    r   Úuser_templates_dirz!_MacOSDefaults.user_templates_dir~   r?   r   c                ó   — t        d«      S )z;Fonts directory tied to the user, e.g. ``~/Library/Fonts``.z~/Library/Fontsr=   r   s    r   Úuser_fonts_dirz_MacOSDefaults.user_fonts_dirƒ   s   € ô Ð-Ó.Ð.r   c                ó:   — | j                  t        d«      d¬«      S )zNPreference directory tied to the user, e.g. ``~/Library/Preferences/AppName``.z~/Library/PreferencesTr   r   r   s    r   Úuser_preference_dirz"_MacOSDefaults.user_preference_dirˆ   s!   € ð ×0Ñ0´Ð>UÓ1VÐ`dÐ0ÓeÐer   c                ó   — t        d«      S )z6Bin directory tied to the user, e.g. ``~/.local/bin``.z~/.local/binr=   r   s    r   Úuser_bin_dirz_MacOSDefaults.user_bin_dir�   s   € ô ˜NÓ+Ð+r   c                 ó   — y)z7Bin directory shared by users, e.g. ``/usr/local/bin``.z/usr/local/bin© r   s    r   Úsite_bin_dirz_MacOSDefaults.site_bin_dir’   s   € ð  r   c                ó   — t        d«      S )zAApplications directory tied to the user, e.g. ``~/Applications``.z~/Applicationsr=   r   s    r   Úuser_applications_dirz$_MacOSDefaults.user_applications_dir—   s   € ô Ð,Ó-Ð-r   c                ó   — dgS )Nz/ApplicationsrY   r   s    r   Ú_site_applications_dirsz&_MacOSDefaults._site_applications_dirsœ   s   € àÐ Ð r   c                ó:   — | j                  t        d«      d¬«      S )z_Runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``.z~/Library/Caches/TemporaryItemsTr   r   r   s    r   Úuser_runtime_dirz_MacOSDefaults.user_runtime_dir    s!   € ð ×0Ñ0´Ð>_Ó1`ÐjnÐ0ÓoÐor   c                ó   — | j                   S )z>Runtime directory shared by users, same as `user_runtime_dir`.)r`   r   s    r   Úsite_runtime_dirz_MacOSDefaults.site_runtime_dir¥   s   € ð ×$Ñ$Ð$r   N)ÚreturnÚstr)rc   z	list[str])#Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úpropertyr    r%   r(   r*   r,   r.   r1   r3   r7   r9   r;   r>   rA   rC   rF   rI   rK   rM   rO   rQ   rS   rU   rW   rZ   r\   r^   r`   rb   rY   r   r   r
   r
      sL  „ ñónóð
 ò1ó ð1ð ò&ó ð&ð ò1ó ð1ð ò&ó ð&ð òaó ðað òó ðð
 ò=ó ð=ð ò1ó ð1ð òó ðð ò_ó ð_ð òQó ðQð ò+ó ð+ð ò+ó ð+ð ò*ó ð*ð ò(ó ð(ð ò'ó ð'ð ò)ó ð)ð ò*ó ð*ð ò(ó ð(ð ò+ó ð+ð ò/ó ð/ð òfó ðfð ò,ó ð,ð ò ó ð ð ò.ó ð.ð ò!ó ð!ð òpó ðpð ò%ó ñ%r   r
   c                  ó   — e Zd ZdZy)ÚMacOSaF  Platform directories for the macOS operating system.

    Follows the guidance from `Apple documentation
    <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
    Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`, `version
    <platformdirs.api.PlatformDirsABC.version>`, `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.

    XDG environment variables (e.g. ``$XDG_DATA_HOME``) are supported and take precedence over macOS defaults.

    N)re   rf   rg   rh   rY   r   r   rk   rk   «   s   „ ò	r   rk   a.  
    (?P<prefix>.+)                 # $HOMEBREW_PREFIX, such as /opt/homebrew or /usr/local
    /opt/python[^/]*               # formula link: python, python3 or python@3.13
    /Frameworks/Python\.framework  # framework build
    /Versions/[^/]+                # interpreter version, such as 3.13
    r   Ú_HOMEBREW_PYTHONc                 óX   — t         j                  t        j                  «      x} r| d   S y )Nr   )rl   Ú	fullmatchÚsysÚbase_prefix)Úmatchs    r   r   r   Ä   s)   € Ü ×*Ñ*¬3¯?©?Ó;Ð;€uÐ;Ø�X‰ÐØr   )rc   z
str | None)rh   Ú
__future__r   Úrero   Útypingr   Ú_xdgr   r   Úapir   r
   rk   ÚcompileÚVERBOSErl   Ú__annotations__r   Ú__all__rY   r   r   Ú<module>r{      sp   ðÚ å "ã 	Û 
Ý ç (Ý  ô[%�_ô [%ô|
ˆH�nô 
ð %˜"Ÿ*™*ðð ‡J�JóÐ �%ó óð ð�r   