
    g                        S r SSKJr  SSKJr  SSKJr  SSKJr  \(       a  SSK	J
r
  \" SS	9            SS
 j5       rSS jrg)z
Path utils    )annotations)	lru_cache)Path)TYPE_CHECKING   )HacsBase   )maxsizec           	     Z   [        U  SU 35      R                  5       [        U  SU 35      R                  5       [        U  SU 35      R                  5       [        U  SU 35      R                  5       [        U  S35      R                  5       [        U  S35      R                  5       1$ )zGet safe paths./z/custom_components/z/custom_templates/)r   as_posix)config_pathappdaemon_pathplugin_pathpython_script_path
theme_paths        ,/config/custom_components/hacs/utils/path.py_get_safe_pathsr      s     	}An-./88:}Ak]+,557}A0123<<>}Aj\*+446}/01::<}./099;     c                    U R                   n[        U5      R                  5       [        U R                  R
                  UR                  UR                  UR                  UR                  5      ;  $ )z*Helper to check if path is safe to remove.)
configurationr   r   r   corer   r   r   r   r   )hacspathr   s      r   is_safer       s_    &&M: 		$$!!((  )  r   N)r   strr   r   r   r   r   r   r   r   returnzset[str])r   r   r   z
str | Pathr   bool)__doc__
__future__r   	functoolsr   pathlibr   typingr   baser   r   r    r   r   <module>r&      sp     "     1  	
   $	r   