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 :  /usr/lib/python3/dist-packages/css_parser/css/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

��3e�����ddlmZmZmZmZddlZddlZddlm	Z	ddl
mZddlm
Z
mZmZmZmZ	dgZdZd	ZddlZej,dd
k\reZneZGd�de	j4�Zy)�)�unicode_literals�division�absolute_import�print_functionN�)�cssrule)�CSSStyleDeclaration)�Prod�PreDef�Sequence�Choice�
ProdParser�
MarginRule�restructuredtextz$Id$�c����eZdZdZgd�Z		d�fd�	Zd�Zed�ed��ZeZ	d�Z
d	�Zd
�Z�fd�Z
eee
d�
�Zd�Zed�ed��Zed�d��Zed��Z�xZS)ra�
    A margin at-rule consists of an ATKEYWORD that identifies the margin box
    (e.g. '@top-left') and a block of declarations (said to be in the margin
    context).

    Format::

        margin :
               margin_sym S* '{' declaration [ ';' S* declaration? ]* '}' S*
               ;

        margin_sym :
               TOPLEFTCORNER_SYM |
               TOPLEFT_SYM |
               TOPCENTER_SYM |
               TOPRIGHT_SYM |
               TOPRIGHTCORNER_SYM |
               BOTTOMLEFTCORNER_SYM |
               BOTTOMLEFT_SYM |
               BOTTOMCENTER_SYM |
               BOTTOMRIGHT_SYM |
               BOTTOMRIGHTCORNER_SYM |
               LEFTTOP_SYM |
               LEFTMIDDLE_SYM |
               LEFTBOTTOM_SYM |
               RIGHTTOP_SYM |
               RIGHTMIDDLE_SYM |
               RIGHTBOTTOM_SYM
               ;

    e.g.::

        @top-left {
            content: "123";
            }
    )z@top-left-cornerz	@top-leftz@top-centerz
@top-rightz@top-right-cornerz@bottom-left-cornerz@bottom-leftz@bottom-centerz
@bottom-rightz@bottom-right-cornerz	@left-topz@left-middlez@left-bottomz
@right-topz
@right-middlez
@right-bottomc���tt|�||��dx|_|_|r||_|r||_||_yt|��|_||_y)z�
        :param atkeyword:
            The margin area, e.g. '@top-left' for this rule
        :param style:
            CSSStyleDeclaration for this MarginRule
        )�
parentRule�parentStyleSheetN�r)	�superr�__init__�
_atkeyword�_keyword�margin�styler	�	_readonly)�selfrrrr�readonly�	__class__s      ��;/usr/lib/python3/dist-packages/css_parser/css/marginrule.pyrzMarginRule.__init__Ksa���	�j�$�(�J�:J�	)�	L�+/�.���$�-�� �D�K���D�J�"���-��=�D�J�!���c���|j|�}|tjvrF|jj	d|j
�d|��tjj��y||_	||_
y)z2Check if new keyword fits the rule it is used for.z!Invalid margin @keyword for this z rule: ��errorN)�
_normalizer�margins�_logr%r�xml�dom�InvalidModificationErrrr)rr�ns   r!�
_setMarginzMarginRule._setMarginbs_���O�O�F�#���J�&�&�&��I�I�O�O�!�[�[�&�2�"%�'�'�"@�"@�
�
B�
 �D�O�"�D�Mr"c��|jS�N)r�rs r!�<lambda>zMarginRule.<lambda>os
��4�?�?�r"zfMargin area of parent CSSPageRule. `margin` and `atkeyword` are both normalized @keyword of the @rule.)�docc�~�d|jj�d|j�d|jj�d�S)Nzcss_parser.css.z(margin=z, style=�))r �__name__rr�cssTextr0s r!�__repr__zMarginRule.__repr__vs-�����'�'����d�j�j�6H�6H�J�	Jr"c��d|jj|j|jjt|�fzS)Nz5<css_parser.css.%s object margin=%r style=%r at 0x%x>)r r5rrr6�idr0s r!�__str__zMarginRule.__str__zs>���!�^�^�4�4�!�[�[�!�Z�Z�/�/���X�'�'�	'r"c�@�tjj|�S)z#Return serialized property cssText.)�
css_parser�ser�
do_MarginRuler0s r!�_getCssTextzMarginRule._getCssText�s���~�~�+�+�D�1�1r"c����tt��|�tdd�dd��}t	td�fd�d��tjd	d
�t	ttjd��|�d
���tjddd���}t�j|d|�\}}}}|r��j|�d|vr|dj�_
nB�jjd�jzt j"j$��t'����_d|vr|d�j(_yyy)ad
        :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.
        �styletokensc��|dk7S)N�}�)�t�vs  r!r1z(MarginRule._setCssText.<locals>.<lambda>�s
��a�3�h�r"T)�name�match�toStore�
storeTokenz@ marginc�T��|dk(xr!�j|�tjvS)N�	ATKEYWORD)r&rr')rErFrs  �r!r1z(MarginRule._setCssText.<locals>.<lambda>�s-����;�.�G�"�o�o�a�0�J�4F�4F�F�r"r)rGrHrI�OPEN�{�@)rIc��y)N)rNrDrDr"r!r1z(MarginRule._setCssText.<locals>.<lambda>�s�r")�minmax�CLOSErC)�stopAndKeeprz#No margin @keyword for this %s ruler$rN)rr�_setCssTextr
rr�charr
�unknownruler�parse�_setSeq�valuerr(r%r)r*r+r	rr6)	rr6rA�prods�ok�seq�store�unusedr s	`       �r!rTzMarginRule._setCssText�sA���	�j�$�+�G�4��
�!6�#0�&*�	����:�%G�'/�	 � ���V�S�1�!�&��);�);�C�)H�)4�#6�):�$� ���W�c�t�D��� ",��!3�!3�G�4@�49�";���C�����L�L����5� �#�H�o�3�3����	�	��� E� $���!,�&)�g�g�&D�&D� �F�
-��=�D�J���%�%*�=�%9��
�
�"�&�r"z*(DOM) The parsable textual representation.)�fget�fsetr2c��|j�t|t�rt||��|_y||_||_y)zt
        :param style: A string or CSSStyleDeclaration which replaces the
            current style object.
        )r6rN)�_checkReadonly�
isinstance�string_typer	�_style�_parentRule)rrs  r!�	_setStylezMarginRule._setStyle�s7��
	
�����e�[�)�-�e��M�D�K� $�E���D�Kr"c��|jSr/)rer0s r!r1zMarginRule.<lambda>�s
��$�+�+�r"z-(DOM) The declaration-block of this rule set.c��|jSr/)�MARGIN_RULEr0s r!r1zMarginRule.<lambda>�s���!1�!1�r"z=The type of this rule, as defined by a CSSRule type constant.c�,�t|j�Sr/)�bool�	atkeywordr0s r!r1zMarginRule.<lambda>�s��t�D�N�N�';�r")NNNNF)r5�
__module__�__qualname__�__doc__r'rr-�propertyrrmr7r:r?rTr6rgr�type�
wellformed�
__classcell__)r s@r!rrs����#�H�G�$<@�16�"�.#��2�J�3�4�F�
�I�J�'�2�?:�B�K�k�G�I�G�
 �
�-�y�H�
J�E��1�)�*�D��;�<�Jr")�
__future__rrrr�xml.domr)r<�r�cssstyledeclarationr	�css_parser.prodparserr
rrr
r�__all__�
__docformat__�__version__�sys�version_info�strrd�
basestring�CSSRulerrDr"r!�<module>r�sc��R�R����4�L�L�7��.��"�
���
����A��!���K��K�H=����H=r"

Youez - 2016 - github.com/yon3zu
LinuXploit