ó
    ùŠÂj¶  ã                   ó¢  • S r SSKrSSKrSSKrSSKJrJr  SSKJr  SSK	J
r
  SSKrSSKJrJr  \R                  R!                  S5      (       a  SSKr\R$                  " 5         SS	S
SSSS.r\R(                  \R*                  \R,                  \R.                  S.rSS jrS\S\\   4S jrS\4S jrSS\\   S\4S jjr\S:X  a  \" 5         gg)zÑ
qr - Convert stdin (or the first argument) to a QR Code.

When stdout is a tty the QR Code is printed to the terminal and when stdout is
a pipe to a file an image is written. The default image format is PNG.
é    N)ÚNoReturnÚOptional)ÚIterable)Úmetadata)Ú	BaseImageÚDrawerAliases)ÚwinÚcygwinzqrcode.image.pil.PilImagezqrcode.image.pure.PyPNGImagezqrcode.image.svg.SvgImagez!qrcode.image.svg.SvgFragmentImagezqrcode.image.svg.SvgPathImagezqrcode.image.pure.PymagingImage)ÚpilÚpngÚsvgzsvg-fragmentzsvg-pathÚpymaging)ÚLÚMÚQÚHc                 óÌ  ^• U c  [         R                  SS  n [        R                  " S5      n[        R
                  " [        =(       d    SR                  5       US9mS[        S[        4U4S jjnTR                  SS	[        [        5       S
3S9  TR                  SS[        5        S
3S9  TR                  S[        SS9  TR                  SS[        [         R#                  5       5      SSS9  TR                  SSSS9  TR                  SSS9  TR%                  U 5      u  p0UR&                  (       a7  [        R)                  UR&                  UR&                  5      n [+        U5      nOS n[.        R0                  " [         UR                      WS9nU (       a  U S   nUR3                  SS9nO([         R4                  R6                  R9                  5       nUR:                  c  UR=                  U5        OUR=                  XƒR:                  S 9  UR>                  (       aA  URA                  5       n	[C        UR>                  S!5       n
U	RE                  U
5        S S S 5        g Ucg  [F        RH                  " [         RJ                  RM                  5       5      (       d  URN                  (       a  URQ                  URN                  (       + S"9  g 0 n[S        URT                  S#S 5      nURV                  (       aZ  U(       d  U" S$5        URV                  U;  a   U" URV                   S%[        U5       35        XÃRV                     u  pÞU" S'0 UD6US&'   UR@                  " S'0 UD6n	[         RJ                  RY                  5         U	RE                  [         RJ                  R6                  5        g ! [,         a  nU" [        U5      5         S nAGN]S nAff = f! , (       d  f       g = f)(Né   ÚqrcodeÚ )ÚusageÚversionÚmsgÚreturnc                 ó(   >• TR                  U 5        e ©N)Úerror)r   Úparsers    €ÚL/var/www/website/venv/lib/python3.13/site-packages/qrcode/console_scripts.pyÚraise_errorÚmain.<locals>.raise_error3   s   ø€ Ø�‰�SÔØó    z	--factoryz‘Full python path to the image factory class to create the image with. You can use the following shortcuts to the built-in image factory classes: Ú.)Úhelpz--factory-drawerzUse an alternate drawer. z
--optimizezŸOptimize the data by looking for chunks of at least this many characters that could use a more efficient encoding method. Use 0 to turn off chunk optimization.)Útyper$   z--error-correctionÚchoicer   z^The error correction level to use. Choices are L (7%), M (15%, default), Q (25%), and H (30%).)r%   ÚchoicesÚdefaultr$   z--asciiz'Print as ascii even if stdout is piped.Ú
store_true)r$   Úactionz--outputzLThe output file. If not specified, the image is sent to the standard output.)Úerror_correctionÚimage_factoryr   Úsurrogateescape)Úerrors)ÚoptimizeÚwb)ÚttyÚdrawer_aliasesz+The selected factory has no drawer aliases.z$ factory drawer not found. Expected Úmodule_drawer© )-ÚsysÚargvr   r   ÚoptparseÚOptionParserÚ__doc__ÚstripÚstrr   Ú
add_optionÚcommasÚdefault_factoriesÚget_drawer_helpÚintÚsortedr+   ÚkeysÚ
parse_argsÚfactoryÚgetÚget_factoryÚ
ValueErrorr   ÚQRCodeÚencodeÚstdinÚbufferÚreadr/   Úadd_dataÚoutputÚ
make_imageÚopenÚsaveÚosÚisattyÚstdoutÚfilenoÚasciiÚprint_asciiÚgetattrr,   Úfactory_drawerÚflush)Úargsr   r    ÚoptsÚmoduler,   ÚeÚqrÚdataÚimgÚoutÚkwargsÚaliasesÚ
drawer_clsÚdrawer_kwargsr   s                  @r   Úmainrg   +   sq  ø€ Ø�|Ü�x‰x˜˜ˆ|ˆä×Ò˜xÓ(€GÜ×"Ò"¬'¯-°R×)>Ñ)>Ó)@È'ÑR€Fðœð ¤÷ ð ×ÑØð+ä+1Ô2CÓ+DÐ*EÀQðHð ñ ð ×ÑØØ(¬Ó):Ð(;¸1Ð=ð ñ ð ×ÑØÜðAð ñ ð ×ÑØØÜÔ'×,Ñ,Ó.Ó/Øð2ð ñ ð ×ÑØÐAÈ,ð ñ ð ×ÑØðð ñ ð ×"Ñ" 4Ó(�J€Dà‡|‡|Ü"×&Ñ& t§|¡|°T·\±\ÓBˆð	 Ü'¨Ó/‰Mð ˆä	�ŠÜ)¨$×*?Ñ*?Ñ@Ø#ñ
€Bö
 Ø�A‰wˆØ�{‰{Ð"3ˆ{Ð4‰ä�y‰y×Ñ×$Ñ$Ó&ˆØ‡}�}ÑØ
�‰�DÕà
�‰�D§=¡=ˆÑ1à‡{‡{Ø�m‰m‹oˆÜ�$—+‘+˜tÔ$¨Ø�H‰H�SŒM÷ %Ð$ð Ñ ¤b§i¢i´·
±
×0AÑ0AÓ0C×&DÑ&DÈÏ
Ï
Ø�N‰N 4§:¡:œ~ˆNÑ.ØàˆÜ+2Ø×ÑÐ.°ó,
ˆð ××ÞÙÐIÔJØ×"Ñ"¨'Ó1ÙØ×*Ñ*Ð+ð ,!Ü!'¨£Ð 1ð3ôð )0×0CÑ0CÑ(DÑ%ˆJÙ&0Ñ&A°=Ñ&AˆF�?Ñ#Ø�mŠmÑ%˜fÑ%ˆä�
‰
×ÑÔØ�‰”—‘×"Ñ"Õ#øô] ó 	 Ùœ˜A›×Òûð	 ú÷, %Õ$ús$   Å"N, É	OÎ,
OÎ6OÏOÏ
O#r]   r   c                 ó€   • SU ;  a  [        S5      eU R                  SS5      u  p[        U 0 0 U/5      n[        X!5      $ )Nr#   z+The image factory is not a full python pathr   )rG   ÚrsplitÚ
__import__rX   )r]   ÚnameÚimps      r   rF   rF   �   sE   € Ø
�&ÓÜÐFÓGÐGØ—=‘=  aÓ(�L€FÜ
�V˜R  d VÓ
,€CÜ�3ÓÐr"   c                  óZ  • 0 n [         R                  5        H[  u  p [        U5      n[	        USS 5      nU(       d  M'  U R                  [        U5      [        5       5      nUR                  U5        M]     SR                  S U R                  5        5       5      $ ! [         a     M’  f = f)Nr2   z. c              3   óJ   #   • U  H  u  pS [        US5       SU 3v •  M     g7f)zFor Úandz, use: N)r=   )Ú.0rd   Ú	factoriess      r   Ú	<genexpr>Ú"get_drawer_help.<locals>.<genexpr>¥   s/   é € ð â".ÑˆGð Œv�i Ó'Ð(¨°¨yÕ9Ú".ùs   ‚!#)
r>   ÚitemsrF   ÚImportErrorrX   Ú
setdefaultr=   ÚsetÚaddÚjoin)r$   Úaliasr]   Úimagerd   rq   s         r   r?   r?   ˜   sž   € Ø€DÜ*×0Ñ0Ö2‰ˆð	Ü Ó'ˆEô ,3°5Ð:JÈDÓ+QˆÞÙØ—O‘O¤F¨7£O´S³UÓ;ˆ	Ø�‰�eÖñ 3ð �9‰9ñ à"&§*¡*¤,óó ð øô ó 	Úð	ús   �BÂ
B*Â)B*rt   c                 óŽ   • [        U 5      n U (       d  g[        U 5      S:X  a  U S   $ SR                  U S S 5       SU SU S    3$ )Nr   r   r   z, éÿÿÿÿÚ )ÚtupleÚlenry   )rt   Újoiners     r   r=   r=   «   sP   € Ü�%‹L€EÞØÜ
ˆ5ƒz�QƒØ�Q‰xˆØ�i‰i˜˜c˜r˜
Ó#Ð$ A f X¨Q¨u°R©y¨kÐ:Ð:r"   Ú__main__r   )Úor) r9   r7   rR   r5   Útypingr   r   Úcollections.abcr   Ú	importlibr   r   Úqrcode.image.baser   r   ÚplatformÚ
startswithÚcoloramaÚinitr>   ÚERROR_CORRECT_LÚERROR_CORRECT_MÚERROR_CORRECT_QÚERROR_CORRECT_Hr+   rg   r;   r%   rF   r?   r=   Ú__name__r4   r"   r   Ú<module>r‘      sç   ðñó Û 	Û 
ß %Ý $Ý ã ß 6ð ‡<�<×ÑÐ,×-Ñ-Ûà‡M‚M„Oð 'Ø)Ø&Ø7Ø/à1ñÐ ð 
×	Ñ	Ø	×	Ñ	Ø	×	Ñ	Ø	×	Ñ	ñ	Ð ôb$ðJ˜ð   Y¡ô ð˜ô ñ&;�(˜3‘-ð ;°õ ;ð ˆzÓÙ…Fð r"   