§
    ‹hþhÓ  ã                   ó`   — d dl mZ d dlmZ d„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
	 	 	 	 dd„Zdd„ZdS )é    )ÚSequence)Ú
exceptionsc                 óX   — t          | t          ¦  «        ot          | t          ¦  «         S ©N)Ú
isinstancer   Ústr)Úobjs    úR/var/www/histauto/venv/lib/python3.11/site-packages/plotly/figure_factory/utils.pyÚis_sequencer      s$   € Ý�c�8Ñ$Ô$ÐA­Z¸½SÑ-AÔ-AÐ)AÐAó    c                 ó6  ‡— ddl mŠ t          | d         ‰¦  «        r1t          ˆfd„| D ¦   «         ¦  «        st	          j        d¦  «        ‚dS t          | d         t          ¦  «        r-t          d„ | D ¦   «         ¦  «        st	          j        d¦  «        ‚dS dS )zŸ
    Validates if a list contains all numbers or all strings

    :raises: (PlotlyError) If there are any two items in the list whose
        types differ
    r   ©ÚNumberc              3   ó8   •K  — | ]}t          |‰¦  «        V — Œd S r   ©r   ©Ú.0Úitemr   s     €r
   ú	<genexpr>z!validate_index.<locals>.<genexpr>   s-   øè è € ÐCÐC°•:˜d FÑ+Ô+ÐCÐCÐCÐCÐCÐCr   z^Error in indexing column. Make sure all entries of each column are all numbers or all strings.c              3   ó@   K  — | ]}t          |t          ¦  «        V — Œd S r   ©r   r   ©r   r   s     r
   r   z!validate_index.<locals>.<genexpr>   s,   è è € Ð@Ð@¨T•:˜d¥CÑ(Ô(Ð@Ð@Ð@Ð@Ð@Ð@r   N©Únumbersr   r   Úallr   ÚPlotlyErrorr   )Ú
index_valsr   s    @r
   Úvalidate_indexr   
   sÛ   ø€ ð ÐÐÐÐÐå�*˜Q”- Ñ(Ô(ð ÝÐCÐCÐCÐC¸
ÐCÑCÔCÑCÔCð 	ÝÔ(ðñô ð ð	ð 	õ 
�J˜q”M¥3Ñ	'Ô	'ð ÝÐ@Ð@°ZÐ@Ñ@Ô@Ñ@Ô@ð 	ÝÔ(ðñô ð ðð ð	ð 	r   c                 ó:  ‡— ddl mŠ | D ]�}t          |d         ‰¦  «        r0t          ˆfd„|D ¦   «         ¦  «        st	          j        d¦  «        ‚ŒHt          |d         t          ¦  «        r-t          d„ |D ¦   «         ¦  «        st	          j        d¦  «        ‚Œ‘dS )z¡
    Validates all strings or numbers in each dataframe column

    :raises: (PlotlyError) If there are any two items in any list whose
        types differ
    r   r   c              3   ó8   •K  — | ]}t          |‰¦  «        V — Œd S r   r   r   s     €r
   r   z%validate_dataframe.<locals>.<genexpr>1   s-   øè è € ÐCÐC°D•z $¨Ñ/Ô/ÐCÐCÐCÐCÐCÐCr   zWError in dataframe. Make sure all entries of each column are either numbers or strings.c              3   ó@   K  — | ]}t          |t          ¦  «        V — Œd S r   r   r   s     r
   r   z%validate_dataframe.<locals>.<genexpr>9   s,   è è € Ð@Ð@°•z $­Ñ,Ô,Ð@Ð@Ð@Ð@Ð@Ð@r   Nr   )ÚarrayÚvectorr   s     @r
   Úvalidate_dataframer$   &   sÜ   ø€ ð ÐÐÐÐÐàð ð ˆÝ�f˜Q”i Ñ(Ô(ð 	ÝÐCÐCÐCÐC¸FÐCÑCÔCÑCÔCð Ý Ô,ð*ñô ð ðõ ˜˜qœ	¥3Ñ'Ô'ð 	ÝÐ@Ð@¸Ð@Ñ@Ô@Ñ@Ô@ð Ý Ô,ð*ñô ð øðð r   c                  ó�   ‡— t          | d         ¦  «        Št          ˆfd„| D ¦   «         ¦  «        rt          j        d¦  «        ‚dS )z‹
    Validates that data lists or ndarrays are the same length.

    :raises: (PlotlyError) If any data lists are not the same length.
    r   c              3   ó>   •K  — | ]}t          |¦  «        ‰k    V — Œd S r   )Úlen)r   ÚlstÚlengths     €r
   r   z(validate_equal_length.<locals>.<genexpr>I   s.   øè è € Ð
.Ð
. #�3ˆs‰8Œ8�vÒÐ
.Ð
.Ð
.Ð
.Ð
.Ð
.r   z<Oops! Your data lists or ndarrays should be the same length.N)r'   Úanyr   r   )Úargsr)   s    @r
   Úvalidate_equal_lengthr,   B   s[   ø€ õ ��a”‰\Œ\€FÝ
Ð
.Ð
.Ð
.Ð
.¨Ð
.Ñ
.Ô
.Ñ.Ô.ð 
ÝÔ$ØJñ
ô 
ð 	
ð
ð 
r   c                  óú   — |                       ¦   «         D ]e\  }}	 |dk    r#t          d                     ||¦  «        ¦  «        ‚Œ0# t          $ r) t	          j        d                     ||¦  «        ¦  «        ‚w xY wdS )z¶
    Validates that all values given in key/val pairs are positive.

    Accepts kwargs to improve Exception messages.

    :raises: (PlotlyError) If any value is < 0 or raises.
    r   z{} must be > 0, got {}z{} must be a number, got {}N)ÚitemsÚ
ValueErrorÚformatÚ	TypeErrorr   r   )ÚkwargsÚkeyÚvals      r
   Úvalidate_positive_scalarsr5   O   s¢   € ð —L’L‘N”Nð Yð Y‰ˆˆSð	YØ�aŠxˆxÝ Ð!9×!@Ò!@ÀÀcÑ!JÔ!JÑKÔKÐKð øåð 	Yð 	Yð 	YÝÔ(Ð)F×)MÒ)MÈcÐSVÑ)WÔ)WÑXÔXÐXð	Yøøøð	Yð Ys   ›)AÁ3A8c                 ó`   — 	 d„ | D ¦   «         S # t           $ r t          j        d¦  «        ‚w xY w)z»
    Uses list comprehension to flatten array

    :param (array): An iterable to flatten
    :raises (PlotlyError): If iterable is not nested.
    :rtype (list): The flattened list.
    c                 ó   — g | ]	}|D ]}|‘ŒŒ
S © r8   )r   Úsublistr   s      r
   ú
<listcomp>zflatten.<locals>.<listcomp>h   s%   € Ð>Ð>Ð>˜°gÐ>Ð>¨d�Ð>Ð>Ð>Ð>r   z\Your data array could not be flattened! Make sure your data is entered as lists or ndarrays!)r1   r   r   )r"   s    r
   Úflattenr;   _   sP   € ð
Ø>Ð> EÐ>Ñ>Ô>Ð>øÝð 
ð 
ð 
ÝÔ$ð,ñ
ô 
ð 	
ð
øøøs   ‚ Ž-c                 óô  — t          | ¦  «        }t          | t          ¦  «        s)t          | t          ¦  «        st	          j        d¦  «        ‚| D ]+}t          |t          ¦  «        rt	          j        d¦  «        ‚Œ,t          |dz
  ¦  «        D ]+}| |         | |dz            k    rt	          j        d¦  «        ‚Œ,g }|                     t          d¦  «        | d         g¦  «         t          |dz
  ¦  «        D ]R}g }|                     | |         ¦  «         |                     | |dz            ¦  «         |                     |¦  «         ŒS|                     | |dz
           t          d¦  «        g¦  «         |S )a  
    Returns a list of intervals for categorical colormaps

    Accepts a list or tuple of sequentially increasing numbers and returns
    a list representation of the mathematical intervals with these numbers
    as endpoints. For example, [1, 6] returns [[-inf, 1], [1, 6], [6, inf]]

    :raises: (PlotlyError) If input is not a list or tuple
    :raises: (PlotlyError) If the input contains a string
    :raises: (PlotlyError) If any number does not increase after the
        previous one in the sequence
    zZThe intervals_endpts argument must be a list or tuple of a sequence of increasing numbers.é   z-infr   Úinf)
r'   r   ÚtupleÚlistr   r   r   ÚrangeÚappendÚfloat)Úendptsr)   r   ÚkÚ	intervalsÚintervals         r
   Úendpts_to_intervalsrH   q   s   € õ �‰[Œ[€Få�v¥Ñ'Ô'ð 
­:°f½tÑ+EÔ+Eð 
ÝÔ$ð%ñ
ô 
ð 	
ð ð ð ˆÝ�d�CÑ Ô ð 	ÝÔ(ðñô ð ð	õ �6˜A‘:ÑÔð ð ˆØ�!Œ9˜˜q 1™uœÒ%Ð%ÝÔ(ðñô ð ð &ð ˆ	à×Ò�% ™-œ-¨°¬Ð3Ñ4Ô4Ð4Ý�v ‘zÑ"Ô"ð 	'ð 	'ˆAØˆHØ�OŠO˜F 1œIÑ&Ô&Ð&Ø�OŠO˜F 1 q¡5œMÑ*Ô*Ð*Ø×Ò˜XÑ&Ô&Ð&Ð&à×Ò˜& ¨!¡Ô,­e°E©l¬lÐ;Ñ<Ô<Ð<ØÐr   ÚcolTú#0f0f0fc                 óz  — d|dz
  |z  z
  |z  }|s<d}	d}
|dk    r|dz
  ||z   z  d|z  z   }d}d}nb|dk    r|dz
  ||z   z  d|z  z   }d}d	}nF|dk    rd}	d
}
|dz
  ||z   z  d|z  z   }d}d}n&|dk    r d}
|dz
  ||z   z  d|z  z   }|rd}d}	nd}d}	d}t          ||	|
||ddd| t          d|¬¦  «        ¬¦
  «
        }|S )a#  
    Returns annotation dict for label of n labels of a 1xn or nx1 subplot.

    :param (str) text: the text for a label.
    :param (int) lane: the label number for text. From 1 to n inclusive.
    :param (int) num_of_lanes: the number 'n' of rows or columns in subplot.
    :param (float) subplot_spacing: the value for the horizontal_spacing and
        vertical_spacing params in your plotly.tools.make_subplots() call.
    :param (str) row_col: choose whether labels are placed along rows or
        columns.
    :param (bool) flipped: flips text by 90 degrees. Text is printed
        horizontally if set to True and row_col='row', or if False and
        row_col='col'.
    :param (bool) right_side: only applicable if row_col is set to 'row'.
    :param (str) text_color: color of the text.
    r=   ÚcenterÚmiddlerI   g      à?g{®Gázð?r   ÚrowéZ   Úbottomg      ð?i  Úleftg{®Gáz„¿ÚrightFÚpaperé   )ÚsizeÚcolor)
Ú	textangleÚxanchorÚyanchorÚxÚyÚ	showarrowÚxrefÚyrefÚtextÚfont)Údict)r_   ÚlaneÚnum_of_lanesÚsubplot_spacingÚrow_colÚflippedÚ
right_sideÚ
text_colorÚtemprX   rY   rZ   r[   rW   Úannotation_dicts                  r
   Úannotation_dict_for_labelrk   ¦   sg  € ð4 � Ñ! _Ñ4Ñ4¸ÑF€DØð ØˆØˆØ�eÒÐØ˜‘˜d _Ñ4Ñ5¸¸d¹
ÑBˆAØˆAØˆIˆIØ˜ÒÐØ˜‘˜d _Ñ4Ñ5¸¸d¹
ÑBˆAØˆAØˆIøà�eÒÐØˆGØˆGØ˜‘˜d _Ñ4Ñ5¸¸d¹
ÑBˆAØˆAØˆIˆIØ˜ÒÐØˆGØ˜‘˜d _Ñ4Ñ5¸¸d¹
ÑBˆAØð "Ø�Ø ��à�Ø!�ØˆIåØØØØ
Ø
ØØØØÝ�r Ð,Ñ,Ô,ðñ ô €Oð Ðr   Úandc                 ó¬   — t          | ¦  «        dk     rt          j        d¦  «        ‚t          | ¦  «        dz
  dz  dz   |z   dz   |dz  z   } |j        | Ž S )z´
    Returns an English listing of objects seperated by commas ','

    For example, ['foo', 'bar', 'baz'] becomes 'foo, bar and baz'
    if the conjunction 'and' is selected.
    é   z1Your list or tuple must contain at least 2 items.z{}, z{} z {}ú.)r'   r   r   r0   )ÚiterableÚconjÚperiodÚtemplates       r
   Úlist_of_optionsrt   í   sk   € õ ˆ8�}„}�qÒÐÝÔ$Ø?ñ
ô 
ð 	
õ �H‘” Ñ! VÑ+¨eÑ3°dÑ:¸UÑBÀVÈcÁ\ÑQ€HØˆ8Œ?˜HÐ%Ð%r   N)rI   TTrJ   )rl   T)Úcollections.abcr   Úplotlyr   r   r   r$   r,   r5   r;   rH   rk   rt   r8   r   r
   ú<module>rw      sÞ   ðØ $Ð $Ð $Ð $Ð $Ð $à Ð Ð Ð Ð Ð ðBð Bð Bðð ð ð8ð ð ð8

ð 

ð 

ðYð Yð Yð 
ð 
ð 
ð$2ð 2ð 2ðt ØØØðDð Dð Dð DðN&ð &ð &ð &ð &ð &r   