
    i              
       p    S SK Jr  S SKrS SKrS\S\\   S\S\S\4
S jr/ S	Q/S
S/SS
/// SQ// SQ/S.rg)    )TupleN	icon_pathallowed_typesconvert_typeworkpathreturnc                   ^ [         R                  R                  U 5      (       d  [        SU  S35      e[         R                  R	                  U 5      u  pEUSS nXQ;   a[  [
        U   n[        U S5       nUR                  [        S U 5       5      5      mSSS5        [        U4S jU 5       5      (       a  U $  SS	K
Jn  SSK
n	 S[        R                  " U R!                  5       5      R#                  5        SU 3n
[         R                  R%                  X:5      nUR                  U 5       nUR&                  S:X  a.  UR(                  R+                  SS5      b  UR-                  S5      nUR/                  U5        SSS5        Un U $ ! , (       d  f       N= f! [         a    [        S
U  SU SU SU S3	5      ef = f! , (       d  f       NI= f! U	R0                   a    [        SU  SU SU 35      ef = f)a  
Returns a valid icon path or raises an Exception on error.
Ensures that the icon exists, and, if necessary, attempts to convert it to correct OS-specific format using Pillow.

Takes:
icon_path - the icon given by the user
allowed_types - a tuple of icon formats that should be allowed through
    EX: ("ico", "exe")
convert_type - the type to attempt conversion too if necessary
    EX: "icns"
workpath - the temp directory to save any newly generated image files
zIcon input file z
 not found   Nrbc              3   8   #    U  H  n[        U5      v   M     g 7fN)len).0ss     FC:\des-py\RoboSAPF\venv\Lib\site-packages\PyInstaller\building\icon.py	<genexpr>&normalize_icon_type.<locals>.<genexpr>,   s     ;
1A
s   c              3   X   >#    U  H  n[        T5      S [        U5       U:H  v   M!     g 7fr   )listr   )r   r   headers     r   r   r   -   s%     >:atF|GSV$):s   '*r   )ImagezReceived icon image 'zH' which exists but is not in the correct format. On this platform, only z images may be used as icons. If Pillow is installed, automatic conversion will be attempted. Please install Pillow or convert your 'z' file to one of z and try again.z
generated-.PtransparencyRGBAz,Something went wrong converting icon image 'z' to '.z' with Pillow, perhaps the image format is unsupported. Try again with a different file or use a file that can be used without conversion on this platform: )ospathexistsFileNotFoundErrorsplitexthex_signaturesopenreadmaxanyPILr   ImportError
ValueErrorhashlibsha256encode	hexdigestjoinmodeinfogetconvertsaveUnidentifiedImageError)r   r   r   r   _	extension
signaturesfPILImager&   _generated_namegenerated_iconimr   s                @r   normalize_icon_typer<      s    77>>)$$"29+Z HII77##I.LA!"I !#I.
)T"aVVC;
;;<F #>:>>>

)
&w~~i6F6F6H'I'S'S'U&VVWXdWefh@]]9%ww#~"''++nd"C"O ZZ'GGN# & #	 K #"  
#I; /!? #DDM;N_`m_n o
 	

 &% %% 
:9+W\N [<<I?L
 	

s>   5"F<
F A(G /AG?
G 
F#F?
GG %G8)   P   N   G      
      rB   M   Z   )r   r   r
   r   )i   c   n   s   )pngexeicoicns)typingr   r   r)   strr<   r!        r   <module>rR      sk     	 >3 >uSz >QT >`c >hk >H ==4L4,'$%%&	rQ   