Ë
    {D™jû%  ã                  óœ   — d Z ddlmZ ddlZddlZddlmZ erddlm	Z	 ddl
mZ ddlmZ erdd	lmZ  G d
„ de«      Z G d„ dee«      ZdgZy)zmacOS.é    )ÚannotationsN)ÚTYPE_CHECKING)ÚIteratoré   )ÚXDGMixin)ÚPlatformDirsABC)ÚPathc                  óx  — 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"ed)d „«       Z#ed(d!„«       Z$ed(d"„«       Z%ed(d#„«       Z&d+d$„Z'd+d%„Z(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        j                  j                  d«      «      S )Nz~/Library/Application Support©Ú_append_app_name_and_versionÚosÚpathÚ
expanduser©Úselfs    ú^/var/www/html/Astrologybackend/backend/venv/lib/python3.12/site-packages/platformdirs/macos.pyÚ_base_user_app_support_dirz)_MacOSDefaults._base_user_app_support_dir   s#   € Ø×0Ñ0´·±×1CÑ1CÐDcÓ1dÓeÐeó    c                óè   — dt         j                  v }|r"t         j                  j                  d«      d   nd}|r| j                  |› d�«      gng }|j	                  | j                  d«      «       |S )Nú/opt/pythonr   Ú z/sharez/Library/Application Support©ÚsysÚprefixÚsplitr   Úappend©r   Úis_homebrewÚhomebrew_prefixÚ	path_lists       r   Ú_base_site_dirsz_MacOSDefaults._base_site_dirs   sn   € Ø#¤s§z¡zÐ1ˆÙ@Kœ#Ÿ*™*×*Ñ*¨=Ó9¸!Ò<ÐQSˆÙWb�T×6Ñ6¸/Ð9JÈ&Ð7QÓRÑSÐhjˆ	Ø×Ñ˜×:Ñ:Ð;YÓZÔ[ØÐ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                ó8   — | j                  | j                  «      S )z`Data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``.)Ú _first_item_as_path_if_multipathÚsite_data_dirr   s    r   Úsite_data_pathz_MacOSDefaults.site_data_path/   s   € ð ×4Ñ4°T×5GÑ5GÓHÐHr   c                ó8   — | j                  | j                  «      S )zbConfig path shared by users. Only return the first item, even if ``multipath`` is set to ``True``.)r.   Úsite_config_dirr   s    r   Úsite_config_pathz_MacOSDefaults.site_config_path4   s   € ð ×4Ñ4°T×5IÑ5IÓJÐJr   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_dir9   r'   r   c                ó"   — | j                  «       S r)   r*   r   s    r   Ú_site_config_dirsz _MacOSDefaults._site_config_dirs>   r,   r   c                ó^   — | j                  t        j                  j                  d«      «      S )zNCache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``.z~/Library/Cachesr   r   s    r   Úuser_cache_dirz_MacOSDefaults.user_cache_dirB   s%   € ð ×0Ñ0´·±×1CÑ1CÐDVÓ1WÓXÐXr   c                óè   — dt         j                  v }|r"t         j                  j                  d«      d   nd}|r| j                  |› d�«      gng }|j	                  | j                  d«      «       |S )Nr   r   r   z
/var/cachez/Library/Cachesr   r   s       r   Ú_site_cache_dirsz_MacOSDefaults._site_cache_dirsG   sn   € à#¤s§z¡zÐ1ˆÙ@Kœ#Ÿ*™*×*Ñ*¨=Ó9¸!Ò<ÐQSˆÙ[f�T×6Ñ6¸/Ð9JÈ*Ð7UÓVÑWÐlnˆ	Ø×Ñ˜×:Ñ:Ð;LÓMÔNØÐr   c                óz   — | j                   }| j                  rt        j                  j	                  |«      S |d   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``.r   )r;   Ú	multipathr   ÚpathsepÚjoin©r   Údirss     r   Úsite_cache_dirz_MacOSDefaults.site_cache_dirO   s1   € ð ×$Ñ$ˆØ(,¯ªŒr�z‰z�‰˜tÓ$ÐC¸DÀ¹GÐCr   c                ó8   — | j                  | j                  «      S )zaCache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``.)r.   rB   r   s    r   Úsite_cache_pathz_MacOSDefaults.site_cache_pathU   s   € ð ×4Ñ4°T×5HÑ5HÓIÐIr   c                ó"   — | j                  «       S )z:State directory tied to the user, same as `user_data_dir`.r%   r   s    r   Úuser_state_dirz_MacOSDefaults.user_state_dirZ   r'   r   c                ó(   — | j                  «       d   S )z9State directory shared by users, same as `site_data_dir`.r   r*   r   s    r   Úsite_state_dirz_MacOSDefaults.site_state_dir_   s   € ð ×#Ñ#Ó% aÑ(Ð(r   c                ó^   — | j                  t        j                  j                  d«      «      S )zJLog directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``.z~/Library/Logsr   r   s    r   Úuser_log_dirz_MacOSDefaults.user_log_dird   s%   € ð ×0Ñ0´·±×1CÑ1CÐDTÓ1UÓVÐVr   c                ó$   — | j                  d«      S )zHLog directory shared by users, e.g. ``/Library/Logs/$appname/$version``.z/Library/Logs)r   r   s    r   Úsite_log_dirz_MacOSDefaults.site_log_diri   s   € ð ×0Ñ0°ÓAÐAr   c                ó@   — t         j                  j                  d«      S )z;Documents directory tied to the user, e.g. ``~/Documents``.z~/Documents©r   r   r   r   s    r   Úuser_documents_dirz!_MacOSDefaults.user_documents_dirn   ó   € ô �w‰w×!Ñ! -Ó0Ð0r   c                ó@   — t         j                  j                  d«      S )z;Downloads directory tied to the user, e.g. ``~/Downloads``.z~/DownloadsrN   r   s    r   Úuser_downloads_dirz!_MacOSDefaults.user_downloads_dirs   rP   r   c                ó@   — t         j                  j                  d«      S )z9Pictures directory tied to the user, e.g. ``~/Pictures``.z
~/PicturesrN   r   s    r   Úuser_pictures_dirz _MacOSDefaults.user_pictures_dirx   ó   € ô �w‰w×!Ñ! ,Ó/Ð/r   c                ó@   — t         j                  j                  d«      S )z5Videos directory tied to the user, e.g. ``~/Movies``.z~/MoviesrN   r   s    r   Úuser_videos_dirz_MacOSDefaults.user_videos_dir}   ó   € ô �w‰w×!Ñ! *Ó-Ð-r   c                ó@   — t         j                  j                  d«      S )z3Music directory tied to the user, e.g. ``~/Music``.z~/MusicrN   r   s    r   Úuser_music_dirz_MacOSDefaults.user_music_dir‚   s   € ô �w‰w×!Ñ! )Ó,Ð,r   c                ó@   — t         j                  j                  d«      S )z7Desktop directory tied to the user, e.g. ``~/Desktop``.z	~/DesktoprN   r   s    r   Úuser_desktop_dirz_MacOSDefaults.user_desktop_dir‡   s   € ô �w‰w×!Ñ! +Ó.Ð.r   c                ó@   — t         j                  j                  d«      S )z9Projects directory tied to the user, e.g. ``~/Projects``.z
~/ProjectsrN   r   s    r   Úuser_projects_dirz _MacOSDefaults.user_projects_dirŒ   rU   r   c                ó@   — t         j                  j                  d«      S )z;Public share directory tied to the user, e.g. ``~/Public``.z~/PublicrN   r   s    r   Úuser_publicshare_dirz#_MacOSDefaults.user_publicshare_dir‘   rX   r   c                ó@   — t         j                  j                  d«      S )z;Templates directory tied to the user, e.g. ``~/Templates``.z~/TemplatesrN   r   s    r   Úuser_templates_dirz!_MacOSDefaults.user_templates_dir–   rP   r   c                ó@   — t         j                  j                  d«      S )z;Fonts directory tied to the user, e.g. ``~/Library/Fonts``.z~/Library/FontsrN   r   s    r   Úuser_fonts_dirz_MacOSDefaults.user_fonts_dir›   s   € ô �w‰w×!Ñ!Ð"3Ó4Ð4r   c                ó^   — | j                  t        j                  j                  d«      «      S )zNPreference directory tied to the user, e.g. ``~/Library/Preferences/AppName``.z~/Library/Preferencesr   r   s    r   Úuser_preference_dirz"_MacOSDefaults.user_preference_dir    s%   € ð ×0Ñ0´·±×1CÑ1CÐD[Ó1\Ó]Ð]r   c                ó@   — t         j                  j                  d«      S )z6Bin directory tied to the user, e.g. ``~/.local/bin``.z~/.local/binrN   r   s    r   Úuser_bin_dirz_MacOSDefaults.user_bin_dir¥   s   € ô �w‰w×!Ñ! .Ó1Ð1r   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         j                  j                  d«      S )zAApplications directory tied to the user, e.g. ``~/Applications``.z~/ApplicationsrN   r   s    r   Úuser_applications_dirz$_MacOSDefaults.user_applications_dir¯   s   € ô �w‰w×!Ñ!Ð"2Ó3Ð3r   c                ó   — dgS )Nz/Applicationsrj   r   s    r   Ú_site_applications_dirsz&_MacOSDefaults._site_applications_dirs´   s   € àÐ Ð r   c                óz   — | j                   }| j                  rt        j                  j	                  |«      S |d   S )z?Applications directory shared by users, e.g. ``/Applications``.r   )ro   r=   r   r>   r?   r@   s     r   Úsite_applications_dirz$_MacOSDefaults.site_applications_dir¸   s1   € ð ×+Ñ+ˆØ(,¯ªŒr�z‰z�‰˜tÓ$ÐC¸DÀ¹GÐCr   c                ó^   — | j                  t        j                  j                  d«      «      S )z_Runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``.z~/Library/Caches/TemporaryItemsr   r   s    r   Úuser_runtime_dirz_MacOSDefaults.user_runtime_dir¾   s%   € ð ×0Ñ0´·±×1CÑ1CÐDeÓ1fÓgÐgr   c                ó   — | j                   S )z>Runtime directory shared by users, same as `user_runtime_dir`.)rs   r   s    r   Úsite_runtime_dirz_MacOSDefaults.site_runtime_dirÃ   s   € ð ×$Ñ$Ð$r   c              #  óT   K  — | j                   –— | j                  E d {  –—†  y 7 Œ­wr)   )r5   r7   r   s    r   Ú_iter_config_dirsz _MacOSDefaults._iter_config_dirsÈ   s!   è ø€ Ø×"Ñ"Ò"Ø×)Ñ)×)Ò)úó   ‚( &¡(c              #  óT   K  — | j                   –— | j                  E d {  –—†  y 7 Œ­wr)   )r&   r+   r   s    r   Ú_iter_data_dirsz_MacOSDefaults._iter_data_dirsÌ   s!   è ø€ Ø× Ñ Ò Ø×'Ñ'×'Ò'úrx   c              #  óT   K  — | j                   –— | j                  E d {  –—†  y 7 Œ­wr)   )r9   r;   r   s    r   Ú_iter_cache_dirsz_MacOSDefaults._iter_cache_dirsÐ   s!   è ø€ Ø×!Ñ!Ò!Ø×(Ñ(×(Ò(úrx   N)ÚreturnÚstr)r}   z	list[str])r}   r	   )r}   zIterator[str])*Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r#   Úpropertyr&   r+   r0   r3   r5   r7   r9   r;   rB   rD   rF   rH   rJ   rL   rO   rR   rT   rW   rZ   r\   r^   r`   rb   rd   rf   rh   rk   rm   ro   rq   rs   ru   rw   rz   r|   rj   r   r   r   r      sµ  „ ñófóð ò1ó ð1ð ò&ó ð&ð òIó ðIð òKó ðKð ò1ó ð1ð ò&ó ð&ð òYó ðYð òó ðð òDó ðDð
 òJó ðJð ò1ó ð1ð ò)ó ð)ð òWó ðWð òBó ðBð ò1ó ð1ð ò1ó ð1ð ò0ó ð0ð ò.ó ð.ð ò-ó ð-ð ò/ó ð/ð ò0ó ð0ð ò.ó ð.ð ò1ó ð1ð ò5ó ð5ð ò^ó ð^ð ò2ó ð2ð ò ó ð ð ò4ó ð4ð ò!ó ð!ð òDó ðDð
 òhó ðhð ò%ó ð%ó*ó(ô)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)r   r€   r�   r‚   rj   r   r   r…   r…   Õ   s   „ ò	r   r…   )r‚   Ú
__future__r   Úos.pathr   r   Útypingr   Úcollections.abcr   Ú_xdgr   Úapir   Úpathlibr	   r   r…   Ú__all__rj   r   r   ú<module>rŽ      sO   ðÙ å "ã Û 
Ý  áÝ(å Ý  áÝô)�_ô )ôD
ˆH�nô 
ð ð�r   