Ë
    ÚŠ±j1<  ã                   ó~  — d Z ddlZddlZddlZddlZddlmZ i Zd„ Zej                  j                  «       D ]@  \  Z
Z e ee«      «      Z	 ej                   eej                  «      «        ee«      ee
<   ŒB [d„ Zd„ Zdd„Zd„ Zej,                  d	d fd
„Z G d„ de«      Zedk(  r e«        yy# e$ r Y ŒMw xY w)z’Command line script to generate (Micro) QR codes with Segno.

"QR Code" and "Micro QR Code" are registered trademarks of DENSO WAVE INCORPORATED.
é    N)Úwritersc                 ó~   — | j                   }|j                  d |j                   }|t        | j                  «       d  S ©N)Ú__code__Úco_varnamesÚco_argcountÚlenÚ__defaults__)ÚfuncÚ	func_codeÚargss      úN/var/www/io.vulcan-creative.com/venv/lib/python3.12/site-packages/segno/cli.pyÚ	_get_argsr      s@   € Ø—‘€IØ× Ñ Ð!7 )×"7Ñ"7Ð8€DØ”�T×&Ñ&Ó'Ð'Ð(Ð)Ð)ó    c                  óâ  — d„ } t        j                  ddt        j                  › �¬«      }|j	                  dddd¬	«       |j	                  d
ddddd„ ¬«       |j	                  dddddd„ ¬«       |j	                  ddd¬«       |j	                  dddd¬«       |j	                  dddd ¬«       |j	                  d!d"d#ddt
        ¬$«       |j	                  d%d&d'd ¬«       |j	                  d(d)d*d¬«       |j	                  d+d,d-dt
        ¬.«       |j	                  d/d0d1dt
        ¬.«       |j	                  d2d3d4d5| ¬.«       |j	                  d6d7d8d¬	«       |j                  d9d:«      }|j	                  d;d<¬=«       |j	                  d>d?¬=«       |j	                  d@dA¬=«       |j	                  dBdC¬=«       |j	                  dDdE¬=«       |j	                  dFdG¬=«       |j	                  dHdI¬=«       |j	                  dJdK¬=«       |j	                  dLdM¬=«       |j	                  dNdOdP¬Q«       |j	                  dRdSdT¬Q«       |j	                  dUdV¬=«       |j	                  dWdX¬=«       |j	                  dYdZ¬=«       |j	                  d[d\¬=«       |j	                  d]d^¬=«       |j	                  d_d`¬=«       |j                  dadb«      }|j	                  dcddd¬e«       |j	                  dfdgdhd ¬«       |j	                  didjdkd ¬«       |j	                  dldmdnd ¬«       |j	                  dodp¬=«       |j	                  dqdr¬=«       |j	                  dsdt¬=«       |j	                  dudv¬=«       |j	                  dwdx¬=«       |j	                  dydzd{d¬«       |j	                  d|d}¬=«       |j	                  d~dt        ¬€«       |j	                  d�d‚dƒ¬«       |j	                  d„d…d¬e«       |j                  d†d‡«      }|j	                  dˆd‰t
        ¬€«       |j                  dŠd‹«      }|j	                  dŒd�d¬e«       |j                  «       j	                  dŽd�d�d‘d’t        j                  › �¬“«       |j	                  d”d•d–¬—«       |S )˜z)    Returns the command line parser.
    c                 óN   — t        | «      } | t        | «      k7  r| S t        | «      S r   )ÚfloatÚint)Úvals    r   Ú_convert_scalez#make_parser.<locals>._convert_scale.   s$   € Ü�C‹jˆØœS ›X’oˆsÐ3¬3¨s«8Ð3r   Úsegnoz2Segno QR Code and Micro QR Code generator version )ÚprogÚdescriptionz	--versionz-vz:(Micro) QR Code version: 1 .. 40 or "M1", "M2", "M3", "M4"F)ÚhelpÚrequiredz--errorz-ez{Error correction level: "L": 7%% (default), "M": 15%%, "Q": 25%%, "H": 30%%, "-": no error correction (used for M1 symbols))ÚLÚMÚQÚHú-Nc                 ó"   — | j                  «       S r   )Úupper©Úxs    r   ú<lambda>zmake_parser.<locals>.<lambda>:   ó   €  q§w¡w£y€ r   )r   ÚchoicesÚdefaultÚtypez--modez-mzNMode. If unspecified (default), an optimal mode is chosen for the given input.)ÚnumericÚalphanumericÚbyteÚkanjiÚhanzic                 ó"   — | j                  «       S r   )Úlowerr#   s    r   r%   zmake_parser.<locals>.<lambda>?   r&   r   z
--encodingzSSets the encoding of the input. If not set (default), a minimal encoding is chosen.)r   r(   z--microz$Allow the creation of Micro QR CodesÚmicroÚ
store_true)r   ÚdestÚactionz
--no-microz-Disallow creation of Micro QR Codes (default)Ústore_falsez	--patternz-pzšMask pattern to use. If unspecified (default), an optimal mask pattern is used. Valid values for QR Codes: 0 .. 7. Valid values for Micro QR Codes: 0 .. 3)r   r   r(   r)   z--no-error-boostz”Disables the automatic error correction level incrementation. By default, the maximal error correction level is used (without changing the version).Úboost_errorz--seqzaCreates a sequence of QR Codes (Structured Append mode). Version or symbol count must be providedÚseqz--symbol-countz-sczNumber of symbols to create)r   r(   r)   z--borderz-bz±Size of the border / quiet zone of the output. By default, the standard border (4 modules for QR Codes, 2 modules for Micro QR Codes) will be used. A value of 0 omits the borderz--scalez-sz–Scaling factor. By default, a scaling factor of 1 is used. That may lead into too small images. Some output formats, i.e. SVG, accept a decimal value.é   z--outputz-ozEOutput file. If not specified, the QR Code is printed to the terminalzModule ColorszöArguments to specify the module colors. Multiple colors are supported for SVG and PNG. The module color support varies between the serialization formats. Most serializers support at least "--dark" and "--light". Unsupported arguments are ignored.z--darka@  Color of the dark modules. The color may be specified as web color name, i.e. "red" or as hexadecimal value, i.e. "#0033cc". Some serializers, i.e. SVG and PNG, support alpha channels (8-digit hexadecimal value) and some support "transparent" / "trans" as color value for alpha transparency. The standard color is black.)r   z--lightzoColor of the light modules. See "dark" for a description of possible values. The standard light color is white.z--finder-darkz)Sets the color of the dark finder modulesz--finder-lightz*Sets the color of the light finder modulesz--separatorz'Sets the color of the separator modulesz--data-darkz'Sets the color of the dark data modulesz--data-lightz(Sets the color of the light data modulesz--timing-darkz)Sets the color of the dark timing modulesz--timing-lightz*Sets the color of the light timing modulesz--align-darkz,Sets the color of the dark alignment modulesÚalignment_dark)r   r3   z--align-lightz-Sets the color of the light alignment modulesÚalignment_lightz--quiet-zonez)Sets the color of the quiet zone (border)z--dark-modulez!Sets the color of the dark modulez--format-darkz5Sets the color of the dark format information modulesz--format-lightz6Sets the color of the light format information modulesz--version-darkz6Sets the color of the dark version information modulesz--version-lightz7Sets the color of the light version information modulesÚSVGzSVG specific optionsz--no-classeszOmits the (default) SVG classes)r   r4   z--no-xmldeclz Omits the XML declaration headerÚxmldeclz--no-namespacezHIndicates that the SVG document should have no SVG namespace declarationÚsvgnsz--no-newlinez?Indicates that the SVG document should have no trailing newlineÚnlz--titlez'Specifies the title of the SVG documentz--descz-Specifies the description of the SVG documentz--svgidz&Indicates the ID of the <svg/> elementz
--svgclasszSIndicates the CSS class of the <svg/> element. An empty string omits the attribute.z--lineclasszUIndicates the CSS class of the <path/> elements. An empty string omits the attribute.z	--no-sizezOIndicates that the SVG document should not have "width" and "height" attributesÚomitsizez--unitz$Indicates SVG coordinate system unitz--svgversionzIndicates the SVG version)r   r)   z--svgencodingz&Specifies the encoding of the documentúutf-8z--draw-transparentz0Indicates that transparent paths should be drawnÚPNGzPNG specific optionsz--dpiz"Sets the DPI value of the PNG fileÚTerminalzTerminal specific optionsz	--compactzEIndicates that the QR code should be printed in a more compact mannerz--verz-VzShows Segno's versionÚversionzSegno )r   r4   rC   Úcontentú+zThe content to encode)Únargsr   )	ÚargparseÚArgumentParserr   Ú__version__Úadd_argumentr   Úadd_argument_groupr   Úadd_mutually_exclusive_group)r   ÚparserÚcolor_groupÚ	svg_groupÚ	png_groupÚterminal_groups         r   Úmake_parserrR   )   sÊ  € ò
4ô ×$Ñ$¨'Ø3eÔfk×fwÑfwÐexÐ1yô{€Fà
×Ñ˜ TÐ0lØ!&ð ô )à
×Ñ˜	 4ð /jà 9Ø $Ù0ð	 ô 2ð
 ×Ñ˜ $ð .6à UØ $Ù0ð	 ô 2ð
 ×Ñ˜ð ,aà $ð ô &ð ×Ñ˜	Ð(NØ$¨\ð ô ;à
×Ñ˜Ð+ZØ$¨]ð ô <à
×Ñ˜ Tð 1Zð "'Ø $Ü ð ô "ð ×ÑÐ*ð 2Sð +°=ð ô Bð ×Ñ˜ð 'Qà"¨<ð ô 9ð ×ÑÐ(¨%Ð6SØ $Ü ð ô "ð ×Ñ˜
 Dð 0Oð !%Ü ð ô "ð ×Ñ˜	 4ð /gð !"Ø+ð	 ô -ð
 ×Ñ˜
 DÐ/vØ!&ð ô (ð ×+Ñ+¨Oð >bó c€Kð ×Ñ˜Xð -KÐô Lð ×Ñ˜Yð .RÐô Sð ×Ñ˜_Ð3^ÐÔ_Ø×ÑÐ-Ð4`ÐÔaØ×Ñ˜]Ð1ZÐÔ[Ø×Ñ˜]Ð1ZÐÔ[Ø×Ñ˜^Ð2\ÐÔ]Ø×Ñ˜_Ð3^ÐÔ_Ø×ÑÐ-Ð4`ÐÔaØ×Ñ˜^Ð2`Ø"2ð ô 6à×Ñ˜_Ð3bØ"3ð ô 7à×Ñ˜^Ð2]ÐÔ^Ø×Ñ˜_Ð3VÐÔWØ×Ñ˜_Ð3jÐÔkØ×ÑÐ-Ð4lÐÔmØ×ÑÐ-Ð4lÐÔmØ×ÑÐ.Ð5nÐÔoð ×)Ñ)¨%Ð1GÓH€IØ×Ñ˜>Ð0QØ".ð ô 0à×Ñ˜>Ð0RØ )Ø"/ð ô 1ð ×ÑÐ+ð 3@à 'Ø"/ð ô 1ð ×Ñ˜>Ð0qØ $Ø"/ð ô 1ð ×Ñ˜9Ð+TÐÔUØ×Ñ˜8Ð*YÐÔZØ×Ñ˜9Ð+SÐÔTØ×Ñ˜<ð /UÐô Và×Ñ˜=ð 0VÐô Wà×Ñ˜;ð .:à *Ø".ð ô 0ð ×Ñ˜8Ð*PÐÔQØ×Ñ˜>Ð0KÜ %ð ô 'à×Ñ˜?Ð1YØ#*ð ô ,à×ÑÐ/Ð6hØ".ð ô 0ð ×)Ñ)¨%Ð1GÓH€IØ×Ñ˜7Ð)MÜ #ð ô %ð ×.Ñ.¨zÐ;VÓW€NØ×Ñ Ð2yØ'3ð  ô 5ð ×'Ñ'Ó)×6Ñ6°wÀÐKbØ>GÐSYÔZ_×ZkÑZkÐYlÐQmð 7ô oà
×Ñ˜	¨Ð3JÐÔKØ€Mr   c                 óh  — t        «       }t        | «      s%|j                  «        t        j                  d«       |j                  | «      }|j                  dk(  rd|_        |j                  }|�t        |«      j                  «       }|j                  s|dv rd|_
        t        t        |«      «      S )z5    Parses the arguments and returns the result.
    r8   r    N)ÚM1ÚM2ÚM3ÚM4)rR   r	   Ú
print_helpÚsysÚexitÚ
parse_argsÚerrorrC   Ústrr"   r1   Ú	_AttrDictÚvars)r   rM   Úparsed_argsrC   s       r   Úparsera   ·   s�   € ô ‹]€FÜˆtŒ9Ø×ÑÔÜ�‰�ŒØ×#Ñ# DÓ)€KØ×Ñ˜CÒØ ˆÔð ×!Ñ!€GØÐÜ�g“,×$Ñ$Ó&ˆØ×Ò Ð,DÑ!DØ ˆÔÜ”T˜+Ó&Ó'Ð'r   c                 óØ  — dD ]&  }| j                  |d«      }|dv rd| |<   Œ|sŒ"|| |<   Œ( dD ]'  }| j                  |d«      �Œ| j                  |d«       Œ) | j                  dd«      r
d| d<   d| d<   | j                  d	d
«      | d<   |�Z||j                  d«      dz   d j                  «       }|dk(  rd}t        j                  |d«      }| D �ci c]  }||v sŒ|| |   “Œ } }| S c c}w )aÓ      Builds a configuration and returns it.

    The config contains only keywords which are supported by the serializer.
    Unsupported values are removed.

    :param dict config: The configuration / dict returned by the :py:func:`parse` function.
    :param filename: Optional filename. If not ``None`` (default), the `filename`
                     must provide a supported extension to identify the serializer.
    :return: A (maybe) modified configuration.
    )ÚdarkÚlightÚfinder_darkÚfinder_lightÚformat_darkÚformat_lightr9   r:   Útiming_darkÚtiming_lightÚ	data_darkÚ
data_lightÚversion_darkÚversion_lightÚ
quiet_zoneÚdark_moduleÚ	separatorN)ÚtransparentÚtrans)ÚsvgidÚsvgclassÚ	lineclassÚ
no_classesFru   rv   Úsvgencodingr@   Úencodingú.r8   ÚsvgzÚsvg© )ÚpopÚgetÚrfindr0   Ú_EXT_TO_KW_MAPPING)ÚconfigÚfilenameÚclrr   ÚnameÚextÚsupported_argsÚks           r   Úbuild_configr‰   Í   s#  € ð :ò 	ˆð
 �j‰j˜˜dÓ#ˆØÐ*Ñ*ØˆF�3ŠKÚØˆF�3ŠKð	ð 3ò #ˆØ�:‰:�d˜DÓ!Ñ)Ø�J‰J�t˜TÕ"ð#ð ‡z�z�, Ô&Ø!ˆˆzÑØ"ˆˆ{ÑàŸ™ M°7Ó;€Fˆ:ÑØÐØ�x—~‘~ cÓ*¨QÑ.Ð/Ð0×6Ñ6Ó8ˆØ�&Š=ØˆCÜ+×/Ñ/°°RÓ8ˆð )/ÖF 1°!°~Ò2E�!�V˜A‘Y‘,ÐFˆÐFØ€Mùò Gs   Ã	C'ÃC'c           
      óÚ  — t         j                  }t        | j                  d«      | j                  d«      | j                  d«      | j                  d«      | j                  d«      | j                  d«      ¬«      }| j                  d«      r%t         j                  }| j                  d	«      |d	<   n| j                  d
«      |d
<    |dj                  | j                  d«      «      fi |¤ŽS )aA      Creates the (Micro) QR Code (Sequence).

    Configuration parameters used for creating the Micro QR Code, QR Code
    or QR Code Sequence are removed from the configuration.

    :param config: Configuration, see :py:func:`build_config`
    :return: :py:class:`segno.QRCode` or :py:class:`segno.QRCodeSequence`.
    Úmoder\   rC   Úpatternry   r6   )r‹   r\   rC   Úmaskry   r6   r7   Úsymbol_countr1   ú rD   )r   ÚmakeÚdictr~   Úmake_sequenceÚjoin)r‚   r�   Úkws      r   Ú	make_coder•   û   s¼   € ô �:‰:€DÜ	�6—:‘:˜fÓ%¨V¯Z©Z¸Ó-@Ø—j‘j Ó+°&·*±*¸YÓ2GØ—z‘z *Ó-Ø Ÿ*™* ]Ó3ô
5€Bð ‡z�z�%ÔÜ×"Ñ"ˆØ#ŸZ™Z¨Ó7ˆˆ>Òà—j‘j Ó)ˆˆ7‰Ù�—‘˜Ÿ™ IÓ.Ó/Ñ6°2Ñ6Ð6r   r8   c                 ó¨  — t        | «      }	 t        |«      }|j                  d«      }|€'|j                  |d   |j                  dd«      ¬«       y |j                  |fi t        ||¬«      ¤Ž y# t        $ rW}t        j                  j                  t        |«      t        j                  g«       t        j                  d«      cY d }~S d }~ww xY w)	Nr8   ÚoutputÚborderÚcompactF)r˜   r™   )rƒ   r   )ra   r•   Ú
ValueErrorrY   ÚstderrÚ
writelinesr]   ÚosÚlineseprZ   r~   Úterminalr   Úsaver‰   )r   r‚   ÚqrÚexr—   s        r   Úmainr£     s²   € Ü�4‹[€FðÜ�vÓˆð �Z‰Z˜Ó!€FØ€~Ø
�‰˜6 (Ñ+°V·Z±ZÀ	È5Ó5QˆÔRð ð 	ˆ�‰�Ñ@œ, v¸Ô?Ò@Øøô ò Ü�
‰
×Ñœs 2›w¬¯
©
Ð3Ô4Ü�x‰x˜‹{Õûðús   �A1 Á1	CÁ:ACÃCÃCc                   ó"   ‡ — e Zd ZdZˆ fd„Zˆ xZS )r^   z    Internal helper class.
    c                 ó2   •— t        ‰| �  |i |¤Ž | | _        y r   )ÚsuperÚ__init__Ú__dict__)Úselfr   ÚkwargsÚ	__class__s      €r   r§   z_AttrDict.__init__%  s   ø€ Ü‰Ñ˜$Ð) &Ò)Øˆ�r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r§   Ú__classcell__)r«   s   @r   r^   r^   !  s   ø„ ñ÷ð r   r^   Ú__main__r   )r¯   r�   rY   rG   r   r   r�   r   Ú_VALID_SERIALIZERSÚitemsr†   r   ÚsetÚkwsÚupdateÚ__wrapped__ÚAttributeErrorÚ	frozensetrR   ra   r‰   r•   Úargvr£   r‘   r^   r¬   r}   r   r   ú<module>r»      sì   ðñó
 
Û 
Û Û Ý ð Ð ò*ð ×+Ñ+×1Ñ1Ó3ò -�I€CˆÙ
‰i˜‹oÓ
€CðØ�
‰
‘9˜T×-Ñ-Ó.Ô/ñ (¨›nÐ�sÒð-ð òKò\(ó,+ò\7ð. �h‰h�q�rˆló ô�ô ð ˆzÒÙ…Fð øðQ ò Ùðús   Á!B4Â4B<Â;B<