Ë
    F‚$h¶  ã                   óŒ  — d Z ddlZddlZddlZddlmZmZ ddlmZ ddl	m
Z
 ddlZddlmZmZ ej                  j!                  d«      rddlZ ej$                  «        dd	d
ddddœZej(                  ej*                  ej,                  ej.                  dœZdd„Zdedee   fd„Zdefd„Zddee   defd„Zedk(  r e«        yy)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                 óœ  ‡— | €t         j                  dd  } t        j                  d«      }t	        j
                  t        xs dj                  «       |¬«      Šdt        dt        fˆfd„}‰j                  dd	t        t        «      › d
�¬«       ‰j                  ddt        «       › d
�¬«       ‰j                  dt        d¬«       ‰j                  ddt        t         j#                  «       «      dd¬«       ‰j                  ddd¬«       ‰j                  dd¬«       ‰j%                  | «      \  }} |j&                  r7t        j)                  |j&                  |j&                  «      }	 t+        |«      }nd }t/        j0                  t         |j                      ¬«      }| r| d   }|j3                  d¬«      }n(t         j4                  j6                  j9                  «       }|j:                  €|j=                  |«       n|j=                  ||j:                  ¬ «       |j>                  rA|jA                  «       }	tC        |j>                  d!«      5 }
|	jE                  |
«       d d d «       y |€[tG        jH                  t         jJ                  jM                  «       «      s|jN                  r|jQ                  |jN                   ¬"«       y i }tS        |jT                  d#d «      }|jV                  rU|s |d$«       |jV                  |vr  ||jV                  › d%t        |«      › �«       ||jV                     \  }} |d'i |¤Ž|d&<    |j@                  d'i |¤Ž}	t         jJ                  jY                  «        |	jE                  t         jJ                  j6                  «       y # t,        $ r} |t        |«      «       Y d }~�ŒCd }~ww xY w# 1 sw Y   y xY w)(Né   ÚqrcodeÚ )ÚusageÚversionÚmsgÚreturnc                 ó(   •— ‰j                  | «       ‚ ©N)Úerror)r   Úparsers    €úT/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/qrcode/console_scripts.pyÚraise_errorz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   Úmainrf   +   s�  ø€ Ø€|Ü�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 4§=¡=ˆÔ1à‡{‚{Ø�m‰m‹oˆÜ�$—+‘+˜tÓ$ð 	¨Ø�H‰H�SŒM÷	ð 	ð Ð ¤b§i¡i´·
±
×0AÑ0AÓ0CÔ&DÈÏ
Ê
Ø�N‰N 4§:¡:˜~ˆNÔ.ØàˆÜ+2Ø×ÑÐ.°ó,
ˆð ×ÒÙÙÐIÔJØ×"Ñ"¨'Ñ1ÙØ×*Ñ*Ð+ð ,!Ü!'¨£Ð 1ð3ôð )0°×0CÑ0CÑ(DÑ%ˆJ˜Ù&0Ñ&A°=Ñ&AˆF�?Ñ#Øˆb�m‰mÑ%˜fÑ%ˆä�
‰
×ÑÔØ�‰”—‘×"Ñ"Õ#øô] ò 	 Ùœ˜A›×Òûð	 ú÷,	ð 	ús$   Å)N ÉOÎ	N?Î#N:Î:N?ÏOr\   r   c                 ó€   — d| vrt        d«      ‚| j                  dd«      \  } }t        | i i |g«      }t        ||«      S )Nr"   z+The image factory is not a full python pathr   )rF   ÚrsplitÚ
__import__rW   )r\   ÚnameÚimps      r   rE   rE   �   sI   € Ø
�&ÑÜÐFÓGÐGØ—=‘=  aÓ(�L€FˆDÜ
�V˜R  d VÓ
,€CÜ�3˜ÓÐr!   c                  óH  — i } t         j                  «       D ]U  \  }}	 t        |«      }t	        |dd «      }|sŒ"| j                  t        |«      t        «       «      }|j                  |«       ŒW dj                  d„ | j                  «       D «       «      S # t        $ r Y Œ‰w xY w)Nr1   z. c              3   óF   K  — | ]  \  }}d t        |d«      › d|› �–— Œ y­w)zFor Úandz, use: N)r<   )Ú.0rc   Ú	factoriess      r   ú	<genexpr>z"get_drawer_help.<locals>.<genexpr>¥   s1   è ø€ ò áˆG�Yð Œv�i Ó'Ð(¨°¨yÔ9ñùs   ‚!)
r=   ÚitemsrE   ÚImportErrorrW   Ú
setdefaultr<   ÚsetÚaddÚjoin)r#   Úaliasr\   Úimagerc   rp   s         r   r>   r>   ˜   s¥   € Ø€DÜ*×0Ñ0Ó2ò 	‰ˆˆvð	Ü Ó'ˆEô ,3°5Ð:JÈDÓ+QˆÙØØ—O‘O¤F¨7£O´S³UÓ;ˆ	Ø�‰�eÕð	ð �9‰9ñ à"&§*¡*£,ôó ð øô ò 	Ùð	ús   žBÂ	B!Â B!rr   c                 ó‚   — t        | «      } | syt        | «      dk(  r| d   S dj                  | d d «      › d|› d| d   › �S )Nr   r   r   z, éÿÿÿÿú )ÚtupleÚlenrw   )rr   Ú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) r8   r6   rQ   r4   Ú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*   rf   r:   r$   rE   r>   r<   Ú__name__r3   r!   r   ú<module>r�      sæ   ðñó Û 	Û 
ß %Ý $Ý ã ß 6ð ‡<�<×ÑÐ,Ô-Ûà€H‡M�M„Oð 'Ø)Ø&Ø7Ø/à1ñÐ ð 
×	Ñ	Ø	×	Ñ	Ø	×	Ñ	Ø	×	Ñ	ñ	Ð ób$ðJ˜ð   Y¡ó ð˜ó ñ&;�(˜3‘-ð ;°ó ;ð ˆzÒÙ…Fð r!   