
    Xh                     z    d Z ddlmZmZmZmZ ddlmZmZ ddl	m
Z
 g dZe G d d	e             Z G d
 de      Zy)zContains the Layout class    )UnicodeInstanceCaselessStrEnumvalidate   )Widgetregister   ) __jupyter_widgets_base_version__)inheritinitialunsetc                   	    e Zd ZdZ ed      j                  d      Z ed      j                  d      Z ee      j                  d      Z	 ed      j                  d      Z
 eg dez   dd	      j                  d      Z eg d
ez   dd	      j                  d      Z eg dez   dd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eg dez   dd	      j                  d      Z eg dez   dd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eddd	      j                  d      Z eddd 	      j                  d      Z eddd!	      j                  d      Z  eddd"	      j                  d      Z! eddd#	      j                  d      Z" eddd$	      j                  d      Z# eddd%	      j                  d      Z$ eddd&	      j                  d      Z% ed'd(gez   dd)	      j                  d      Z& eddd*	      j                  d      Z' eg d+dd,	      j                  d      Z( eddd-	      j                  d      Z) eddd.	      j                  d      Z* eg d/ez   dd0	      j                  d      Z+ eddd1	      j                  d      Z, eddd2	      j                  d      Z- eddd3	      j                  d      Z. eddd4	      j                  d      Z/ eddd5	      j                  d      Z0 eddd6	      j                  d      Z1 eddd7	      j                  d      Z2 eddd8	      j                  d      Z3 fd9Z4d: Z5d; Z6 e7e5e6      Z8 xZ9S )<Layouta  Layout specification

    Defines a layout that can be expressed using CSS.  Supports a subset of
    https://developer.mozilla.org/en-US/docs/Web/CSS/Reference

    When a property is also accessible via a shorthand property, we only
    expose the shorthand.

    For example:
    - ``flex-grow``, ``flex-shrink`` and ``flex-basis`` are bound to ``flex``.
    - ``flex-wrap`` and ``flex-direction`` are bound to ``flex-flow``.
    - ``margin-[top/bottom/left/right]`` values are bound to ``margin``, etc.
    
LayoutViewT)syncz@jupyter-widgets/baseLayoutModel)
flex-startflex-endcenterspace-betweenspace-aroundzspace-evenlystretchz The align-content CSS attribute.)
allow_nonehelp)r   r   r   baseliner   zThe align-items CSS attribute.)autor   r   r   r   r   zThe align-self CSS attribute.NzThe border top CSS attribute.zThe border right CSS attribute.z The border bottom CSS attribute.zThe border left CSS attribute.zThe bottom CSS attribute.zThe display CSS attribute.zThe flex CSS attribute.zThe flex-flow CSS attribute.zThe height CSS attribute.)r   r   r   r   r   z"The justify-content CSS attribute.)r   r   r   z The justify-items CSS attribute.zThe left CSS attribute.zThe margin CSS attribute.zThe max-height CSS attribute.zThe max-width CSS attribute.zThe min-height CSS attribute.zThe min-width CSS attribute.zThe overflow CSS attribute.zThe order CSS attribute.zThe padding CSS attribute.zThe right CSS attribute.zThe top CSS attribute.visiblehiddenzThe visibility CSS attribute.zThe width CSS attribute.)containcoverfillz
scale-downnonezThe object-fit CSS attribute.z"The object-position CSS attribute.z$The grid-auto-columns CSS attribute.)columnrowz	row densezcolumn densez!The grid-auto-flow CSS attribute.z!The grid-auto-rows CSS attribute.zThe grid-gap CSS attribute.z%The grid-template-rows CSS attribute.z(The grid-template-columns CSS attribute.z&The grid-template-areas CSS attribute.zThe grid-row CSS attribute.zThe grid-column CSS attribute.zThe grid-area CSS attribute.c                     d|v r-|j                  d      }dD ]  }|j                  d| |        t        |   di | y )Nbordertoprightbottomleftborder_ )pop
setdefaultsuper__init__)selfkwargsr'   side	__class__s       T/var/www/html/myenv/lib/python3.12/site-packages/ipywidgets/widgets/widget_layout.pyr2   zLayout.__init__P   sQ    vZZ)F: <!!GD6"2F;< 	"6"    c                 t    d}dD ]0  }t        | d|z         s y|t        | d|z         }}|	|*||k7  s0 y |S )z
        `border` property getter. Return the common value of all side
        borders if they are identical. Otherwise return None.

        Nr(   r-   )hasattrgetattr)r3   foundr5   olds       r7   _get_borderzLayout._get_borderX   sX     6 	D4T!12i$.> ?C}Uc\	 r8   c                 2    dD ]  }t        | d|z   |        y)zO
        `border` property setter. Set all 4 sides to `border` string.
        r(   r-   N)setattr)r3   r'   r5   s      r7   _set_borderzLayout._set_borderg   s$     7 	4DD)d*F3	4r8   ):__name__
__module____qualname____doc__r   tag
_view_name_view_moduler   _view_module_version_model_namer   CSS_PROPERTIESalign_contentalign_items
align_self
border_topborder_rightborder_bottomborder_leftr+   displayflex	flex_flowheightjustify_contentjustify_itemsr,   margin
max_height	max_width
min_height	min_widthoverfloworderpaddingr*   r)   
visibilitywidth
object_fitobject_positiongrid_auto_columnsgrid_auto_flowgrid_auto_rowsgrid_gapgrid_template_rowsgrid_template_columnsgrid_template_areasgrid_rowgrid_column	grid_arear2   r>   rA   propertyr'   __classcell__r6   s   @r7   r   r      s    &***5J2377T7BL"#CDHHdHS-(,,$,7K $ %35C%DPT[} @C  @C  IM  @C  @N ! #!/#0<@Ggiililrviliw   ")+9":FJQprruru{ru  sA $5TUYY_cYdJ4D7XY]]cg]hLDT8Z[__ei_jM$46VW[[ae[fKTd1LMQQW[Q\Fdt2NOSSY]S^G4D/HIMMSWMXD4RSWW]aWbITd1LMQQW[Q\F% ')+9':FJQuwwzwz  AEwz  xF #$H>$Y@BBE#4#. 4D/HIMMSWMXDTd1LMQQW[Q\F$5TUYY_cYdJ4RSWW]aWbI$5TUYY_cYdJ4RSWW]aWbIt3PQUU[_U`HDT0JKOOUYOZEdt2NOSSY]S^GDT0JKOOUYOZE
$4.F
G
K
KQU
K
VC )X!6~!ERV]|}  B  B  HL  B  MJDT0JKOOUYOZE !S`d  lK  L  P  P  VZ  P  [Jdt:^_ccimcnO<bcggmqgr$%PR`%`mq  y\  ]  a  a  gk  a  lNTd9\]aagkalNt3PQUU[_U`H $=deiiosit#DT@jkoouyoz!$4>fgkkqukvt3PQUU[_U`H$46VW[[ae[fK4RSWW]aWbI#4 k;/Fr8   r   c                   "     e Zd ZeZ fdZ xZS )LayoutTraitTypec                     t        |t              r t        |   | | j                  di |      S t        |   ||      S )Nr.   )
isinstancedictr1   r   klass)r3   objvaluer6   s      r7   r   zLayoutTraitType.validateu   s?    eT"7#C)<e)<==7#C//r8   )rB   rC   rD   r   rw   r   rp   rq   s   @r7   rs   rs   q   s    E0 0r8   rs   N)rE   	traitletsr   r   r   r   widgetr   r	   _versionr   rK   r   rs   r.   r8   r7   <module>r}      sD      B B $ 7.	a0V a0 
a0H0h 0r8   