+
    ®¾j�'  ã                  óæ   € R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^RI	H
t
 ]'       d   ^ RIHt  ! R R]
4      tR	 R
 ltR R ltR R ltR R ltR R lt]! RR7      ! ]! 4       4      tR.tR# )zWindows.)ÚannotationsN)Ú	lru_cache)ÚTYPE_CHECKING)ÚPlatformDirsABC)ÚCallablec                  óŽ  € ] tR t^tRt]R R l4       tRR/R R ll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&tR# )'ÚWindowsaØ  
`MSDN on where to store app data files <https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid>`_.

Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`, `appauthor
<platformdirs.api.PlatformDirsABC.appauthor>`, `version <platformdirs.api.PlatformDirsABC.version>`, `roaming
<platformdirs.api.PlatformDirsABC.roaming>`, `opinion <platformdirs.api.PlatformDirsABC.opinion>`, `ensure_exists
<platformdirs.api.PlatformDirsABC.ensure_exists>`.

c               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚstr© )Úformats   "Ú_/home/ralf/ical-fahrzeuge/venv/lib/python3.14/site-packages/pip/_vendor/platformdirs/windows.pyÚ__annotate__ÚWindows.__annotate__   s   € ÷ (ñ (˜sñ (ó    c                ó    € V P                   '       d   RMRp\        P                  P                  \	        V4      4      pV P                  V4      # )z·
:return: data directory tied to the user, e.g.
 ``%USERPROFILE%\AppData\Local\$appauthor\$appname`` (not roaming) or
 ``%USERPROFILE%\AppData\Roaming\$appauthor\$appname`` (roaming)
ÚCSIDL_APPDATAÚCSIDL_LOCAL_APPDATA)ÚroamingÚosÚpathÚnormpathÚget_win_folderÚ_append_parts)ÚselfÚconstr   s   &  r   Úuser_data_dirÚWindows.user_data_dir   s>   € ð $(§<§< <‘Ð5JˆÜ�w‰w×Ñ¤¨uÓ 5Ó6ˆØ×!Ñ! $Ó'Ð'r   Úopinion_valueNc               ó$   € V ^8„  d   QhRRRRRR/# )r   r   r   r!   ú
str | Noner   r   )r   s   "r   r   r   &   s!   € ÷ ñ  #ð ¸ð Èsñ r   c               	óô  € . pV P                   '       d±   V P                  R Jd2   V P                  ;'       g    V P                   pVP                  V4       VP                  V P                   4       Ve$   V P                  '       d   VP                  V4       V P                  '       d   VP                  V P                  4       \
        P                  P                  ! V.VO5!  pV P                  V4       V# )F)	ÚappnameÚ	appauthorÚappendÚopinionÚversionr   r   ÚjoinÚ_optionally_create_directory)r   r   r!   ÚparamsÚauthors   &&$  r   r   ÚWindows._append_parts&   sª   € ØˆØ�<�<ˆ<Ø�~‰~ UÓ*ØŸ™×7Ð7¨4¯<©<�Ø—‘˜fÔ%Ø�M‰M˜$Ÿ,™,Ô'ØÒ(¨T¯\¯\¨\Ø—‘˜mÔ,Ø�|�|ˆ|Ø—‘˜dŸl™lÔ+Ü�w‰w�|Š|˜DÐ* 6Ó*ˆØ×)Ñ)¨$Ô/Øˆr   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   6   s   € ÷ (ñ (˜sñ (r   c                ót   € \         P                  P                  \        R4      4      pV P	                  V4      # )zT:return: data directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``ÚCSIDL_COMMON_APPDATA©r   r   r   r   r   ©r   r   s   & r   Úsite_data_dirÚWindows.site_data_dir5   s/   € ô �w‰w×Ñ¤Ð/EÓ FÓGˆØ×!Ñ! $Ó'Ð'r   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   <   ó   € ÷ "ñ " ñ "r   c                ó   € V P                   # )zC:return: config directory tied to the user, same as `user_data_dir`©r   ©r   s   &r   Úuser_config_dirÚWindows.user_config_dir;   ó   € ð ×!Ñ!Ð!r   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   A   r7   r   c                ó   € V P                   # )zF:return: config directory shared by the users, same as `site_data_dir`)r4   r:   s   &r   Úsite_config_dirÚWindows.site_config_dir@   r=   r   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   F   s   € ÷ ?ñ ? ñ ?r   c                óx   € \         P                  P                  \        R4      4      pV P	                  VRR7      # )z¯
:return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
 ``%USERPROFILE%\AppData\Local\$appauthor\$appname\Cache\$version``
r   ÚCache©r!   r2   r3   s   & r   Úuser_cache_dirÚWindows.user_cache_dirE   s4   € ô �w‰w×Ñ¤Ð/DÓ EÓFˆØ×!Ñ! $°gÐ!Ó>Ð>r   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   O   s   € ÷ ?ñ ? ñ ?r   c                óx   € \         P                  P                  \        R4      4      pV P	                  VRR7      # )zd:return: cache directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname\Cache\$version``r1   rD   rE   r2   r3   s   & r   Úsite_cache_dirÚWindows.site_cache_dirN   s4   € ô �w‰w×Ñ¤Ð/EÓ FÓGˆØ×!Ñ! $°gÐ!Ó>Ð>r   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   U   s   € ÷ "ñ " ñ "r   c                ó   € V P                   # )zB:return: state directory tied to the user, same as `user_data_dir`r9   r:   s   &r   Úuser_state_dirÚWindows.user_state_dirT   r=   r   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   Z   s   € ÷ ñ ˜cñ r   c                ó¤   € 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_data_dir` if not opinionated else ``Logs`` in itÚLogs)r   r(   r   r   r*   r+   r3   s   & r   Úuser_log_dirÚWindows.user_log_dirY   s?   € ð ×!Ñ!ˆØ�<�<ˆ<Ü—7‘7—<‘<  fÓ-ˆDØ×-Ñ-¨dÔ3Øˆr   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   c   s   € ÷ Bñ B Cñ Br   c                óR   € \         P                  P                  \        R4      4      # )zN:return: documents directory tied to the user e.g. ``%USERPROFILE%\Documents``ÚCSIDL_PERSONAL©r   r   r   r   r:   s   &r   Úuser_documents_dirÚWindows.user_documents_dirb   s   € ô �w‰w×Ñ¤Ð/?Ó @ÓAÐAr   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   h   s   € ÷ Cñ C Cñ Cr   c                óR   € \         P                  P                  \        R4      4      # )zN:return: downloads directory tied to the user e.g. ``%USERPROFILE%\Downloads``ÚCSIDL_DOWNLOADSrX   r:   s   &r   Úuser_downloads_dirÚWindows.user_downloads_dirg   s   € ô �w‰w×Ñ¤Ð/@Ó AÓBÐBr   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   m   s   € ÷ Dñ D 3ñ Dr   c                óR   € \         P                  P                  \        R4      4      # )zL:return: pictures directory tied to the user e.g. ``%USERPROFILE%\Pictures``ÚCSIDL_MYPICTURESrX   r:   s   &r   Úuser_pictures_dirÚWindows.user_pictures_dirl   s   € ô �w‰w×Ñ¤Ð/AÓ BÓCÐCr   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   r   s   € ÷ Añ A ñ Ar   c                óR   € \         P                  P                  \        R4      4      # )zH:return: videos directory tied to the user e.g. ``%USERPROFILE%\Videos``ÚCSIDL_MYVIDEOrX   r:   s   &r   Úuser_videos_dirÚWindows.user_videos_dirq   ó   € ô �w‰w×Ñ¤¨Ó ?Ó@Ð@r   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   w   s   € ÷ Añ A ñ Ar   c                óR   € \         P                  P                  \        R4      4      # )zF:return: music directory tied to the user e.g. ``%USERPROFILE%\Music``ÚCSIDL_MYMUSICrX   r:   s   &r   Úuser_music_dirÚWindows.user_music_dirv   rj   r   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   |   s   € ÷ Jñ J #ñ Jr   c                óR   € \         P                  P                  \        R4      4      # )zK:return: desktop directory tied to the user, e.g. ``%USERPROFILE%\Desktop``ÚCSIDL_DESKTOPDIRECTORYrX   r:   s   &r   Úuser_desktop_dirÚWindows.user_desktop_dir{   s   € ô �w‰w×Ñ¤Ð/GÓ HÓIÐIr   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   �   s   € ÷ (ñ ( #ñ (r   c                ó°   € \         P                  P                  \         P                  P                  \	        R4      R4      4      pV P                  V4      # )zm
:return: runtime directory tied to the user, e.g.
 ``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname``
r   ÚTemp)r   r   r   r*   r   r   r3   s   & r   Úuser_runtime_dirÚWindows.user_runtime_dir€   s?   € ô �w‰w×Ñ¤§¡§¡¬^Ð<QÓ-RÐTZÓ [Ó\ˆØ×!Ñ! $Ó'Ð'r   c               ó   € V ^8„  d   QhRR/# r
   r   )r   s   "r   r   r   Š   s   € ÷ %ñ % #ñ %r   c                ó   € V P                   # )zF:return: runtime directory shared by users, same as `user_runtime_dir`)rx   r:   s   &r   Úsite_runtime_dirÚWindows.site_runtime_dir‰   s   € ð ×$Ñ$Ð$r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úpropertyr   r   r4   r;   r@   rF   rJ   rN   rS   rY   r^   rc   rh   rn   rs   rx   r|   Ú__static_attributes__r   r   r   r   r      s_  † ñð ô(ó ð(ðÀd÷ ð ô(ó ð(ð
 ô"ó ð"ð ô"ó ð"ð ô?ó ð?ð ô?ó ð?ð
 ô"ó ð"ð ôó ðð ôBó ðBð ôCó ðCð ôDó ðDð ôAó ðAð ôAó ðAð ôJó ðJð ô(ó ð(ð ô%ó ô%r   r   c               ó    € V ^8„  d   QhRRRR/# ©r   Ú
csidl_namer   r   r   )r   s   "r   r   r   �   s   € ÷ ñ ¨Sð °Sñ r   c                óä   € \        V 4      pVe   V# RRRRRR/P                  V 4      pVf   RV  2p\        V4      h\        P                  P                  V4      pVf   RV 2p\        V4      hV# )	z&Get folder from environment variables.r   ÚAPPDATAr1   ÚALLUSERSPROFILEr   ÚLOCALAPPDATAúUnknown CSIDL name: zUnset environment variable: )Ú(get_win_folder_if_csidl_name_not_env_varÚgetÚ
ValueErrorr   Úenviron)r‡   ÚresultÚenv_var_nameÚmsgs   &   r   Úget_win_folder_from_env_varsr”   �   sŽ   € ä5°jÓA€FØÒØˆð 	˜ØÐ 1Ø˜~ð÷ 
�cˆ*ƒoð	 ð
 ÒØ$ Z LÐ1ˆÜ˜‹oÐÜ�Z‰Z�^‰^˜LÓ)€FØ‚~Ø,¨\¨NÐ;ˆÜ˜‹oÐØ€Mr   c               ó    € V ^8„  d   QhRRRR/# )r   r‡   r   r   r#   r   )r   s   "r   r   r   ¤   s   € ÷ ñ ¸ð Àñ r   c                ó€  € V R8X  dS   \         P                  P                  \         P                  P                  \         P                  R,          4      R4      # V R8X  dS   \         P                  P                  \         P                  P                  \         P                  R,          4      R4      # V R8X  dS   \         P                  P                  \         P                  P                  \         P                  R,          4      R4      # V R8X  dS   \         P                  P                  \         P                  P                  \         P                  R,          4      R	4      # V R
8X  dS   \         P                  P                  \         P                  P                  \         P                  R,          4      R4      # R# )zMGet a folder for a CSIDL name that does not exist as an environment variable.rW   ÚUSERPROFILEÚ	Documentsr]   Ú	Downloadsrb   ÚPicturesrg   ÚVideosrm   ÚMusicN)r   r   r*   r   r�   )r‡   s   &r   r�   r�   ¤   s  € àÐ%Ô%Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Õ-FÓGÈÓUÐUàÐ&Ô&Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Õ-FÓGÈÓUÐUàÐ'Ô'Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Õ-FÓGÈÓTÐTà�_Ô$Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Õ-FÓGÈÓRÐRà�_Ô$Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Õ-FÓGÈÓQÐQÙr   c               ó    € V ^8„  d   QhRRRR/# r†   r   )r   s   "r   r   r   ·   s   € ÷ ñ ¨Sð °Sñ r   c                ó  € RRRRRRRRR	R
RRRRRR/P                  V 4      pVf   RV  2p\        V4      h\        P                  R8w  d   \        h^ RIpVP                  VP                  R4      pVP                  WA4      w  rV\        V4      # )z¬
Get folder from the registry.

This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer
for all CSIDL_* names.

r   ÚAppDatar1   zCommon AppDatar   zLocal AppDatarW   ÚPersonalr]   z&{374DE290-123F-4565-9164-39C4925E467B}rb   zMy Picturesrg   zMy Videorm   zMy MusicNrŒ   Úwin32z@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders)
rŽ   r�   ÚsysÚplatformÚNotImplementedErrorÚwinregÚOpenKeyÚHKEY_CURRENT_USERÚQueryValueExr   )r‡   Úshell_folder_namer“   r¥   ÚkeyÚ	directoryÚ_s   &      r   Úget_win_folder_from_registryr­   ·   s©   € ð 	˜ØÐ 0Ø˜Ø˜*ØÐCØ˜MØ˜Ø˜ð	÷ 
�cˆ*ƒoð ð Ò Ø$ Z LÐ1ˆÜ˜‹oÐÜ
‡|�|�wÔÜ!Ð!Ûà
�.‰.˜×1Ñ1Ð3vÓ
w€CØ×&Ñ& sÓ>�L€IÜˆy‹>Ðr   c               ó    € V ^8„  d   QhRRRR/# r†   r   )r   s   "r   r   r   Õ   s   € ÷ $ñ $¨#ð $°#ñ $r   c                ó^  € ^ RI pR^R^#R^R^R^'R^R^R	^(R
^/	P                  V 4      pVf   RV  2p\        V4      hVP                  R4      p\	        VR4      pVP
                  P                  RVR^ V4       \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       dA   VP                  R4      pVP                  P                  VP                  VR4      '       d   TpV R	8X  d+   \        P                  P                  VP                  R4      # VP                  # )zGet folder with ctypes.Nr   r1   r   rW   rb   rg   rm   r]   rr   rŒ   i   Úwindllc              3  ó>   "  € T F  p\        V4      ^ÿ8„  x € K  	  R# 5i)éÿ   N)Úord)Ú.0Úcs   & r   Ú	<genexpr>Ú,get_win_folder_via_ctypes.<locals>.<genexpr>ñ   s   é € Ð
%¡˜AŒ3ˆq‹6�CŽ<£ùs   ‚TFr™   )ÚctypesrŽ   r�   Úcreate_unicode_bufferÚgetattrÚshell32ÚSHGetFolderPathWÚanyÚkernel32ÚGetShortPathNameWÚvaluer   r   r*   )r‡   r¸   Úcsidl_constr“   Úbufr°   Úbuf2s   &      r   Úget_win_folder_via_ctypesrÄ   Õ   s   € ó ð 	˜Ø Ø˜rØ˜!Ø˜BØ˜Ø˜Ø˜2Ø  "ð
÷ 
�cˆ*ƒoð ð ÒØ$ Z LÐ1ˆÜ˜‹oÐà
×
&Ñ
& tÓ
,€CÜ�V˜XÓ&€FØ
‡N�N×#Ñ# D¨+°t¸QÀÔD÷ ƒsÑ
%¡Ó
%‡s‡s‚sÑ
%¡Ó
%×%Ò%Ø×+Ñ+¨DÓ1ˆØ�?‰?×,Ñ,¨S¯Y©Y¸¸d×CÒCØˆCàÐ&Ô&Ü�w‰w�|‰|˜CŸI™I {Ó3Ð3à�9‰9Ðr   c               ó   € V ^8„  d   QhRR/# )r   r   zCallable[[str], str]r   )r   s   "r   r   r   ü   s   € ÷ ,ñ ,Ð2ñ ,r   c                 ó¤   €  ^ RI p \        V R4      '       d   \        #   ^ RIp\
        #   \         d     Li ; i  \         d
    \        u # i ; i)é    Nr°   )r¸   ÚhasattrrÄ   ÚImportErrorr¥   r­   r”   )r¸   r¥   s     r   Ú_pick_get_win_folderrÊ   ü   s^   € ð-Ûô �6˜8×$Ò$Ü,Ð,ð %ð,Ûô ,Ð+øô ô Ùðûô ô ,Ü+Ò+ð,ús   ‚*  ; ª8·8»AÁA)Úmaxsize)r‚   Ú
__future__r   r   r¢   Ú	functoolsr   Útypingr   Úapir   Úcollections.abcr   r   r”   r�   r­   rÄ   rÊ   r   Ú__all__r   r   r   Ú<module>rÒ      sj   ðÙ å "ã 	Û 
Ý Ý  å  çÝ(ô|%ˆoô |%õ~õ*õ&õ<$õN,ñ   4Õ(Ñ)=Ó)?Ó@€ð ð‚r   