Ë
    £ehî¯  ã                   óv  — d Z ddlmZmZmZ ddlmZ ddlZddlm	Z	 	 ddl
Z
e
j                  ZdZ e	dg d	¢«      Zg d
¢ZdUd„Zd„ Z e
j*                  e
j,                  «       e
j.                  e
j0                  e
j0                  e
j0                  e
j0                  ¬«       e
j.                  e
j,                  e
j,                  e
j,                  ¬«      d„ «       «       «       Z e
j*                  e
j,                  «       e
j.                  e
j0                  e
j0                  e
j0                  e
j0                  ¬«       e
j.                  e
j,                  e
j,                  ¬«      dUd„«       «       «       ZdZdZe
j:                  e
j<                   e
j*                  e
j,                  «       e
j.                  e
j0                  e
j0                  ¬«      d„ «       «       «       «       Ze
j:                  e
j<                   e
j*                  e
j,                  «       e
j.                  e
j,                  ¬«      d„ «       «       «       «       Z d„ Z! e
j*                  e
j,                  «       e
j.                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  ¬«       e
j.                  e
j,                  e
j,                  e
j,                  e
j,                  e
j,                  e
j,                  e
j,                  ¬«      d„ «       «       «       Z"d„ Z# e
j*                  e
j,                  «       e
j.                  e
j0                  e
j0                  e
j0                  ¬«       e
j.                  e
j,                  e
j,                  e
j,                  ¬«      d „ «       «       «       Z$d!„ Z%d"„ Z& e
j*                  e
j,                  «       e
j.                  e
j0                  e
j0                  e
j0                  e
j0                  ¬«       e
j.                  e
j,                  e
j,                  e
j,                  e
j,                  e
j,                  ¬#«      d$„ «       «       «       Z'd%„ Z(d&„ Z)d'„ Z*d(„ Z+d)„ Z,d*„ Z- e
j.                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  ¬+«      d,„ «       Z. e
j*                  e
j0                  «       e
j.                  e
j,                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  ¬-«       e
j.                  e
j,                  e
j,                  e
j,                  e
j,                  ¬.«      d/„ «       «       «       Z/d0„ Z0d1„ Z1 e
j.                  e
j0                  e
j0                  e
j0                  e
j0                  e
j,                  e
j,                  e
j,                  e
j,                  e
j,                  e
j0                  e
j0                  e
j0                  e
j0                  ¬2«      d3„ «       Z2dd4lm3Z3m4Z4m5Z5m6Z6 e3fd5„Z7d6„ Z8d7„ Z9d8„ Z:e
j:                  e
j<                   e
j.                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  ¬9«      d:„ «       «       «       Z;d;„ Z<d<„ Z=e
j:                  e
j<                   e
j.                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  e
j0                  ¬=«      d>„ «       «       «       Z>d?„ Z?d@„ Z@dA„ ZA e
j*                  e
j0                  «       e
j.                  e
j,                  e
j0                  e
j0                  e
j0                  e
j0                  ¬B«       e
j.                  e
j,                  e
j,                  e
j,                  ¬C«      dD„ «       «       «       ZBdE„ ZCdF„ ZDdG„ ZEdH„ ZFdI„ ZGdJ„ ZHdK„ ZIdL„ ZJdM„ ZK	 dVdN„ZLdO„ ZMdP„ ZNdQ„ ZOdR„ ZPdS„ ZQeRdTk(  r4ddlSZSddlTZT eSjª                   eTj¬                  «       j®                  «       yy# eef$ r
 ddlm
Z
 Y �Œ•w xY w)WzNfontTools.misc.bezierTools.py -- tools for working with Bezier path segments.
é    )Ú
calcBoundsÚsectRectÚrectArea)ÚIdentityN)Ú
namedtuple)Úcythong•Ö&è.>ÚIntersection©ÚptÚt1Út2)ÚapproximateCubicArcLengthÚapproximateCubicArcLengthCÚapproximateQuadraticArcLengthÚapproximateQuadraticArcLengthCÚcalcCubicArcLengthÚcalcCubicArcLengthCÚcalcQuadraticArcLengthÚcalcQuadraticArcLengthCÚcalcCubicBoundsÚcalcQuadraticBoundsÚ	splitLineÚsplitQuadraticÚ
splitCubicÚsplitQuadraticAtTÚsplitCubicAtTÚsplitCubicAtTCÚsplitCubicIntoTwoAtTCÚsolveQuadraticÚ
solveCubicÚquadraticPointAtTÚcubicPointAtTÚcubicPointAtTCÚlinePointAtTÚsegmentPointAtTÚlineLineIntersectionsÚcurveLineIntersectionsÚcurveCurveIntersectionsÚsegmentSegmentIntersectionsc                 óP   — t        t        | Ž t        |Ž t        |Ž t        |Ž |«      S )aÄ  Calculates the arc length for a cubic Bezier segment.

    Whereas :func:`approximateCubicArcLength` approximates the length, this
    function calculates it by "measuring", recursively dividing the curve
    until the divided segments are shorter than ``tolerance``.

    Args:
        pt1,pt2,pt3,pt4: Control points of the Bezier as 2D tuples.
        tolerance: Controls the precision of the calcuation.

    Returns:
        Arc length value.
    )r   Úcomplex)Úpt1Úpt2Úpt3Úpt4Ú	tolerances        úX/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/fontTools/misc/bezierTools.pyr   r   8   s,   € ô Ü�ˆ”w �}¤g¨s m´W¸c°]ÀIóð ó    c                 ó|   — | d||z   z  z   |z   dz  }||z   |z
  | z
  dz  }| | |z   dz  ||z
  |f|||z   ||z   dz  |ffS )Né   g      À?ç      à?© )Úp0Úp1Úp2Úp3ÚmidÚderiv3s         r1   Ú_split_cubic_into_twor=   K   so   € Ø��R˜"‘W‘Ñ Ñ" eÑ
+€CØ�2‰g˜‰l˜RÑ 5Ñ(€Fà	ˆb�2‰g˜‰_˜c F™l¨CÐ0Ø	ˆc�F‰l˜R "™W¨™O¨RÐ0ðð r2   )r7   r8   r9   r:   )ÚmultÚarchÚboxc                 óø   — t        ||z
  «      }t        ||z
  «      t        ||z
  «      z   t        ||z
  «      z   }|| z  t        z   |k\  r||z   dz  S t        ||||«      \  }}t        | g|¢­Ž t        | g|¢­Ž z   S ©Nr5   )ÚabsÚEPSILONr=   Ú_calcCubicArcLengthCRecurse)	r>   r7   r8   r9   r:   r?   r@   ÚoneÚtwos	            r1   rE   rE   T   s–   € ô ˆr�B‰w‹<€DÜ
ˆb�2‰g‹,œ˜R "™W›Ñ
%¬¨B°©G«Ñ
4€CØˆd�{”WÑ Ò#Ø�s‘
˜cÑ!Ð!ä(¨¨R°°RÓ8‰ˆˆSÜ*¨4Ð6°#Ò6Ô9TØð:
Øò:
ñ 
ð 	
r2   ©r,   r-   r.   r/   )r0   r>   c                 ó0   — dd|z  z   }t        || |||«      S )zôCalculates the arc length for a cubic Bezier segment.

    Args:
        pt1,pt2,pt3,pt4: Control points of the Bezier as complex numbers.
        tolerance: Controls the precision of the calcuation.

    Returns:
        Arc length value.
    ç      ð?g      ø?)rE   )r,   r-   r.   r/   r0   r>   s         r1   r   r   h   s%   € ð* ��y‘Ñ €DÜ& t¨S°#°s¸CÓ@Ð@r2   é   g»½×Ùß|Û=©Úv1Úv2c                 ó<   — | |j                  «       z  j                  S ©N)Ú	conjugateÚrealrL   s     r1   Ú_dotrS   …   s   € ð
 �—‘“Ñ×%Ñ%Ð%r2   ©Úxc                 óv   — | t        j                  | dz  dz   «      z  dz  t        j                  | «      dz  z   S )Né   é   )ÚmathÚsqrtÚasinhrT   s    r1   Ú_intSecAtanr\   �   s7   € ð Œt�y‰y˜˜A™ ™Ó"Ñ" QÑ&¬¯©°A«¸Ñ):Ñ:Ð:r2   c                 ó@   — t        t        | Ž t        |Ž t        |Ž «      S )až  Calculates the arc length for a quadratic Bezier segment.

    Args:
        pt1: Start point of the Bezier as 2D tuple.
        pt2: Handle point of the Bezier as 2D tuple.
        pt3: End point of the Bezier as 2D tuple.

    Returns:
        Arc length value.

    Example::

        >>> calcQuadraticArcLength((0, 0), (0, 0), (0, 0)) # empty segment
        0.0
        >>> calcQuadraticArcLength((0, 0), (50, 0), (80, 0)) # collinear points
        80.0
        >>> calcQuadraticArcLength((0, 0), (0, 50), (0, 80)) # collinear points vertical
        80.0
        >>> calcQuadraticArcLength((0, 0), (50, 20), (100, 40)) # collinear points
        107.70329614269008
        >>> calcQuadraticArcLength((0, 0), (0, 100), (100, 0))
        154.02976155645263
        >>> calcQuadraticArcLength((0, 0), (0, 50), (100, 0))
        120.21581243984076
        >>> calcQuadraticArcLength((0, 0), (50, -10), (80, 50))
        102.53273816445825
        >>> calcQuadraticArcLength((0, 0), (40, 0), (-40, 0)) # collinear points, control point outside
        66.66666666666667
        >>> calcQuadraticArcLength((0, 0), (40, 0), (0, 0)) # collinear points, looping back
        40.0
    )r   r+   ©r,   r-   r.   s      r1   r   r   —   s    € ô@ #¤7¨C =´'¸3°-ÄÈ#ÀÓOÐOr2   )r,   r-   r.   Úd0Úd1ÚdÚn)ÚscaleÚorigDistÚaÚbÚx0Úx1ÚLenc                 óÈ  — || z
  }||z
  }||z
  }|dz  }t        |«      }|dk(  rt        || z
  «      S t        ||«      }t        |«      t        k  rDt        ||«      dk\  rt        || z
  «      S t        |«      t        |«      }
}	|	|	z  |
|
z  z   |	|
z   z  S t        ||«      |z  }t        ||«      |z  }t        dt        |«      t        |«      z
  z  |z  |||z
  z  z  «      }|S )a$  Calculates the arc length for a quadratic Bezier segment.

    Args:
        pt1: Start point of the Bezier as a complex number.
        pt2: Handle point of the Bezier as a complex number.
        pt3: End point of the Bezier as a complex number.

    Returns:
        Arc length value.
    y              ð?ç        r   rW   )rC   rS   Úepsilonr\   )r,   r-   r.   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   s                 r1   r   r   º   sû   € ð@ 
ˆs‰€BØ	ˆs‰€BØ
ˆR‰€AØ	ˆB‰€AÜ�‹F€EØ�‚|Ü�3˜‘9‹~ÐÜ�A�r‹{€HÜ
ˆ8ƒ}”wÒÜ��B‹<˜1ÒÜ�s˜S‘y“>Ð!Ü�2‹wœ˜B›ˆ1ˆØ�A‘˜˜A™‘ ! a¡%Ñ(Ð(Ü	ˆa�‹�xÑ	€BÜ	ˆa�‹�xÑ	€BÜ
ˆa”;˜r“?¤[°£_Ñ4Ñ5¸Ñ@ÀEÈRÐRTÉWÑDUÑVÓ
W€CØ€Jr2   c                 ó@   — t        t        | Ž t        |Ž t        |Ž «      S )a«  Calculates the arc length for a quadratic Bezier segment.

    Uses Gauss-Legendre quadrature for a branch-free approximation.
    See :func:`calcQuadraticArcLength` for a slower but more accurate result.

    Args:
        pt1: Start point of the Bezier as 2D tuple.
        pt2: Handle point of the Bezier as 2D tuple.
        pt3: End point of the Bezier as 2D tuple.

    Returns:
        Approximate arc length value.
    )r   r+   r^   s      r1   r   r   í   s    € ô *¬'°3¨-¼À#¸ÌÐQTÈÓVÐVr2   r^   )Úv0rM   rN   c                 óœ   — t        d| z  d|z  z   d|z  z   «      }t        || z
  «      dz  }t        d| z  d|z  z
  d|z  z   «      }||z   |z   S )aÃ  Calculates the arc length for a quadratic Bezier segment.

    Uses Gauss-Legendre quadrature for a branch-free approximation.
    See :func:`calcQuadraticArcLength` for a slower but more accurate result.

    Args:
        pt1: Start point of the Bezier as a complex number.
        pt2: Handle point of the Bezier as a complex number.
        pt3: End point of the Bezier as a complex number.

    Returns:
        Approximate arc length value.
    gÌ”xùbŒß¿g¾ðb�ŠÛ?gF�V¨W°?gÇqÇqÜ?gF�V¨W°¿gÌ”xùbŒß?©rC   )r,   r-   r.   rn   rM   rN   s         r1   r   r   þ   s|   € ôB 
Ø˜SÑ Ð#4°sÑ#:Ñ:Ð=OÐRUÑ=UÑUó
€Bô 
ˆS�3‰Y‹Ð,Ñ	,€BÜ	Ø˜cÑ!Ð$5¸Ñ$;Ñ;Ð>OÐRUÑ>UÑUó
€Bð �‰7�R‰<Ðr2   c                 ó\  — t        | ||«      \  \  }}\  }}\  }}|dz  }	|dz  }
g }|	dk7  r|j                  | |	z  «       |
dk7  r|j                  | |
z  «       |D �cg c]2  }d|cxk  rdk  r%n n"||z  |z  ||z  z   |z   ||z  |z  ||z  z   |z   f‘Œ4 c}| |gz   }t        |«      S c c}w )a  Calculates the bounding rectangle for a quadratic Bezier segment.

    Args:
        pt1: Start point of the Bezier as a 2D tuple.
        pt2: Handle point of the Bezier as a 2D tuple.
        pt3: End point of the Bezier as a 2D tuple.

    Returns:
        A four-item tuple representing the bounding rectangle ``(xMin, yMin, xMax, yMax)``.

    Example::

        >>> calcQuadraticBounds((0, 0), (50, 100), (100, 0))
        (0, 0, 100, 50.0)
        >>> calcQuadraticBounds((0, 0), (100, 0), (100, 100))
        (0.0, 0.0, 100, 100)
    ç       @r   rX   )ÚcalcQuadraticParametersÚappendr   )r,   r-   r.   ÚaxÚayÚbxÚbyÚcxÚcyÚax2Úay2ÚrootsÚtÚpointss                 r1   r   r   *  sä   € ô$ $;¸3ÀÀSÓ#IÑ �H€Rˆ‰hˆr�2™˜˜RØ
ˆs‰(€CØ
ˆs‰(€CØ€EØ
ˆa‚xØ�‰�b�S˜3‘YÔØ
ˆa‚xØ�‰�b�S˜3‘YÔð öàØ�Œ:�A�:ð 
ˆa‰�!‰�b˜1‘fÑ	˜rÑ	! 2¨¡6¨A¡:°°Q±Ñ#6¸Ñ#;Ò<òð 
ˆcˆ
ñ	€Fô
 �fÓÐùòs   Á7B)c                 óN   — t        t        | Ž t        |Ž t        |Ž t        |Ž «      S )a®  Approximates the arc length for a cubic Bezier segment.

    Uses Gauss-Lobatto quadrature with n=5 points to approximate arc length.
    See :func:`calcCubicArcLength` for a slower but more accurate result.

    Args:
        pt1,pt2,pt3,pt4: Control points of the Bezier as 2D tuples.

    Returns:
        Arc length value.

    Example::

        >>> approximateCubicArcLength((0, 0), (25, 100), (75, 100), (100, 0))
        190.04332968932817
        >>> approximateCubicArcLength((0, 0), (50, 0), (100, 50), (100, 100))
        154.8852074945903
        >>> approximateCubicArcLength((0, 0), (50, 0), (100, 0), (150, 0)) # line; exact result should be 150.
        149.99999999999991
        >>> approximateCubicArcLength((0, 0), (50, 0), (100, 0), (-50, 0)) # cusp; exact result should be 150.
        136.9267662156362
        >>> approximateCubicArcLength((0, 0), (50, 0), (100, -50), (-50, 0)) # cusp
        154.80848416537057
    )r   r+   rH   s       r1   r   r   L  s*   € ô2 &Ü�ˆ”w �}¤g¨s m´W¸c°]óð r2   )rn   rM   rN   Úv3Úv4c                 ó  — t        || z
  «      dz  }t        d| z  d|z  z   d|z  z   d|z  z   «      }t        || z
  |z   |z
  «      dz  }t        d| z  d|z  z
  d|z  z
  d|z  z   «      }t        ||z
  «      dz  }||z   |z   |z   |z   S )	z¹Approximates the arc length for a cubic Bezier segment.

    Args:
        pt1,pt2,pt3,pt4: Control points of the Bezier as complex numbers.

    Returns:
        Arc length value.
    g333333Ã?g�c’‰1ãá¿g8Ø5$t×Ô?guÁ|Yù¿Ê?gæâ#$ï˜?gÑ?gæâ#$ï˜¿g�c’‰1ãá?rp   )	r,   r-   r.   r/   rn   rM   rN   r�   r‚   s	            r1   r   r   j  s×   € ô> 
ˆS�3‰Y‹˜$Ñ	€BÜ	Ø˜SÑ Ø
˜cÑ
!ñ	"à
˜cÑ
!ñ	"ð ˜cÑ
!ñ	"ó
€Bô 
ˆS�3‰Y˜‰_˜sÑ"Ó	#Ð&9Ñ	9€BÜ	Ø˜SÑ Ø
˜cÑ
!ñ	"à
˜cÑ
!ñ	"ð ˜cÑ
!ñ	"ó
€Bô 
ˆS�3‰Y‹˜$Ñ	€Bà�‰7�R‰<˜"Ñ˜rÑ!Ð!r2   c                 óä  — t        | |||«      \  \  }}\  }}\  }}	\  }
}|dz  }|dz  }|dz  }|dz  }t        |||«      D �cg c]  }d|cxk  rdk  sŒn n|‘Œ }}t        |||	«      D �cg c]  }d|cxk  rdk  sŒn n|‘Œ }}||z   }|D �cg c]<  }||z  |z  |z  ||z  |z  z   ||z  z   |
z   ||z  |z  |z  ||z  |z  z   |	|z  z   |z   f‘Œ> c}| |gz   }t        |«      S c c}w c c}w c c}w )aX  Calculates the bounding rectangle for a quadratic Bezier segment.

    Args:
        pt1,pt2,pt3,pt4: Control points of the Bezier as 2D tuples.

    Returns:
        A four-item tuple representing the bounding rectangle ``(xMin, yMin, xMax, yMax)``.

    Example::

        >>> calcCubicBounds((0, 0), (25, 100), (75, 100), (100, 0))
        (0, 0, 100, 75.0)
        >>> calcCubicBounds((0, 0), (50, 0), (100, 50), (100, 100))
        (0.0, 0.0, 100, 100)
        >>> print("%f %f %f %f" % calcCubicBounds((50, 0), (0, 100), (100, 100), (50, 0)))
        35.566243 0.000000 64.433757 75.000000
    ç      @rr   r   rX   )ÚcalcCubicParametersr   r   )r,   r-   r.   r/   ru   rv   rw   rx   ry   rz   ÚdxÚdyÚax3Úay3Úbx2Úby2r~   ÚxRootsÚyRootsr}   r   s                        r1   r   r   œ  sC  € ô$ .AÀÀcÈ3ÐPSÓ-TÑ*�H€Rˆ‰hˆr�2™˜˜R¡( 2 rà
ˆs‰(€CØ
ˆs‰(€CØ
ˆs‰(€CØ
ˆs‰(€CÜ'¨¨S°"Ó5ÖD�A¸¸a¼À!¾ŠaÐD€FÐDÜ'¨¨S°"Ó5ÖD�A¸¸a¼À!¾ŠaÐD€FÐDØ�V‰O€Eð öð
 ð �‰F�Q‰J˜‰N˜R !™V a™ZÑ'¨"¨q©&Ñ0°2Ñ5Ø�‰F�Q‰J˜‰N˜R !™V a™ZÑ'¨"¨q©&Ñ0°2Ñ5ò	
òð 
ˆcˆ
ñ€Fô �fÓÐùò EùÚDùòs   ÁC#ÁC#Á,C(Á=C(ÂAC-c                 óÄ   — | \  }}|\  }}||z
  }||z
  }	|}
|}||	f|   }|dk(  r| |fgS ||
|f|   z
  |z  }d|cxk  rdk  rn n||z  |
z   |	|z  |z   f}| |f||fgS | |fgS )a  Split a line at a given coordinate.

    Args:
        pt1: Start point of line as 2D tuple.
        pt2: End point of line as 2D tuple.
        where: Position at which to split the line.
        isHorizontal: Direction of the ray splitting the line. If true,
            ``where`` is interpreted as a Y coordinate; if false, then
            ``where`` is interpreted as an X coordinate.

    Returns:
        A list of two line segments (each line segment being two 2D tuples)
        if the line was successfully split, or a list containing the original
        line.

    Example::

        >>> printSegments(splitLine((0, 0), (100, 100), 50, True))
        ((0, 0), (50, 50))
        ((50, 50), (100, 100))
        >>> printSegments(splitLine((0, 0), (100, 100), 100, True))
        ((0, 0), (100, 100))
        >>> printSegments(splitLine((0, 0), (100, 100), 0, True))
        ((0, 0), (0, 0))
        ((0, 0), (100, 100))
        >>> printSegments(splitLine((0, 0), (100, 100), 0, False))
        ((0, 0), (0, 0))
        ((0, 0), (100, 100))
        >>> printSegments(splitLine((100, 0), (0, 0), 50, False))
        ((100, 0), (50, 0))
        ((50, 0), (0, 0))
        >>> printSegments(splitLine((0, 100), (0, 0), 50, True))
        ((0, 100), (0, 50))
        ((0, 50), (0, 0))
    r   rX   r6   )r,   r-   ÚwhereÚisHorizontalÚpt1xÚpt1yÚpt2xÚpt2yru   rv   rw   rx   re   r~   ÚmidPts                  r1   r   r   Â  s°   € ðH �J€Dˆ$Ø�J€Dˆ$à	�‰€BØ	�‰€Bà	€BØ	€Bà	ˆRˆ�Ñ€AàˆA‚vØ�c�
ˆ|ÐØ	�"�b�˜,Ñ'Ñ	'¨1Ñ,€AØˆA„z�…zØ�Q‘˜‘˜R !™V b™[Ð(ˆØ�e�˜u c˜lÐ+Ð+à�c�
ˆ|Ðr2   c                 ó¦   — t        | ||«      \  }}}t        ||   ||   ||   |z
  «      }t        d„ |D «       «      }|s| ||fgS t        |||g|¢­Ž S )a  Split a quadratic Bezier curve at a given coordinate.

    Args:
        pt1,pt2,pt3: Control points of the Bezier as 2D tuples.
        where: Position at which to split the curve.
        isHorizontal: Direction of the ray splitting the curve. If true,
            ``where`` is interpreted as a Y coordinate; if false, then
            ``where`` is interpreted as an X coordinate.

    Returns:
        A list of two curve segments (each curve segment being three 2D tuples)
        if the curve was successfully split, or a list containing the original
        curve.

    Example::

        >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 150, False))
        ((0, 0), (50, 100), (100, 0))
        >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 50, False))
        ((0, 0), (25, 50), (50, 50))
        ((50, 50), (75, 50), (100, 0))
        >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 25, False))
        ((0, 0), (12.5, 25), (25, 37.5))
        ((25, 37.5), (62.5, 75), (100, 0))
        >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 25, True))
        ((0, 0), (7.32233, 14.6447), (14.6447, 25))
        ((14.6447, 25), (50, 75), (85.3553, 25))
        ((85.3553, 25), (92.6777, 14.6447), (100, -7.10543e-15))
        >>> # XXX I'm not at all sure if the following behavior is desirable:
        >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 50, True))
        ((0, 0), (25, 50), (50, 50))
        ((50, 50), (50, 50), (50, 50))
        ((50, 50), (75, 50), (100, 0))
    c              3   ó>   K  — | ]  }d |cxk  rdk  sŒn n|–— Œ y­w©r   rX   Nr6   ©Ú.0r~   s     r1   ú	<genexpr>z!splitQuadratic.<locals>.<genexpr>"  ó   è ø€ Ò:˜Q¨q°A¬z¸®z”qÑ:ùó   ‚“
)rs   r   ÚsortedÚ_splitQuadraticAtT)	r,   r-   r.   r�   r‘   re   rf   ÚcÚ	solutionss	            r1   r   r   û  ss   € ôF & c¨3°Ó4�G€A€qˆ!ÜØ	ˆ,‰˜˜<™¨!¨L©/¸EÑ*Aó€Iô Ñ: )Ô:Ó:€IÙØ�c˜3�Ð Ð Ü˜a  AÐ2¨	Ò2Ð2r2   c                 ó¶   — t        | |||«      \  }}}}	t        ||   ||   ||   |	|   |z
  «      }
t        d„ |
D «       «      }
|
s| |||fgS t        ||||	g|
¢­Ž S )aÞ  Split a cubic Bezier curve at a given coordinate.

    Args:
        pt1,pt2,pt3,pt4: Control points of the Bezier as 2D tuples.
        where: Position at which to split the curve.
        isHorizontal: Direction of the ray splitting the curve. If true,
            ``where`` is interpreted as a Y coordinate; if false, then
            ``where`` is interpreted as an X coordinate.

    Returns:
        A list of two curve segments (each curve segment being four 2D tuples)
        if the curve was successfully split, or a list containing the original
        curve.

    Example::

        >>> printSegments(splitCubic((0, 0), (25, 100), (75, 100), (100, 0), 150, False))
        ((0, 0), (25, 100), (75, 100), (100, 0))
        >>> printSegments(splitCubic((0, 0), (25, 100), (75, 100), (100, 0), 50, False))
        ((0, 0), (12.5, 50), (31.25, 75), (50, 75))
        ((50, 75), (68.75, 75), (87.5, 50), (100, 0))
        >>> printSegments(splitCubic((0, 0), (25, 100), (75, 100), (100, 0), 25, True))
        ((0, 0), (2.29379, 9.17517), (4.79804, 17.5085), (7.47414, 25))
        ((7.47414, 25), (31.2886, 91.6667), (68.7114, 91.6667), (92.5259, 25))
        ((92.5259, 25), (95.202, 17.5085), (97.7062, 9.17517), (100, 1.77636e-15))
    c              3   ó>   K  — | ]  }d |cxk  rdk  sŒn n|–— Œ y­wr™   r6   rš   s     r1   rœ   zsplitCubic.<locals>.<genexpr>G  r�   rž   )r†   r    rŸ   Ú_splitCubicAtT)r,   r-   r.   r/   r�   r‘   re   rf   r¡   ra   r¢   s              r1   r   r   (  s�   € ô6 % S¨#¨s°CÓ8�J€A€qˆ!ˆQÜØ	ˆ,‰˜˜<™¨!¨L©/¸1¸\¹?ÈUÑ;Ró€Iô Ñ: )Ô:Ó:€IÙØ�c˜3 Ð$Ð%Ð%Ü˜!˜Q  1Ð1 yÒ1Ð1r2   c                 ó@   — t        | ||«      \  }}}t        |||g|¢­Ž S )a•  Split a quadratic Bezier curve at one or more values of t.

    Args:
        pt1,pt2,pt3: Control points of the Bezier as 2D tuples.
        *ts: Positions at which to split the curve.

    Returns:
        A list of curve segments (each curve segment being three 2D tuples).

    Examples::

        >>> printSegments(splitQuadraticAtT((0, 0), (50, 100), (100, 0), 0.5))
        ((0, 0), (25, 50), (50, 50))
        ((50, 50), (75, 50), (100, 0))
        >>> printSegments(splitQuadraticAtT((0, 0), (50, 100), (100, 0), 0.5, 0.75))
        ((0, 0), (25, 50), (50, 50))
        ((50, 50), (62.5, 50), (75, 37.5))
        ((75, 37.5), (87.5, 25), (100, 0))
    )rs   r    )r,   r-   r.   Útsre   rf   r¡   s          r1   r   r   M  s,   € ô( & c¨3°Ó4�G€A€qˆ!Ü˜a  AÐ+¨Ò+Ð+r2   c                 óˆ   — t        | |||«      \  }}}}t        ||||g|¢­Ž }	| g|	d   dd ¢­|	d<   g |	d   dd ¢|‘­|	d<   |	S )a   Split a cubic Bezier curve at one or more values of t.

    Args:
        pt1,pt2,pt3,pt4: Control points of the Bezier as 2D tuples.
        *ts: Positions at which to split the curve.

    Returns:
        A list of curve segments (each curve segment being four 2D tuples).

    Examples::

        >>> printSegments(splitCubicAtT((0, 0), (25, 100), (75, 100), (100, 0), 0.5))
        ((0, 0), (12.5, 50), (31.25, 75), (50, 75))
        ((50, 75), (68.75, 75), (87.5, 50), (100, 0))
        >>> printSegments(splitCubicAtT((0, 0), (25, 100), (75, 100), (100, 0), 0.5, 0.75))
        ((0, 0), (12.5, 50), (31.25, 75), (50, 75))
        ((50, 75), (59.375, 75), (68.75, 68.75), (77.3438, 56.25))
        ((77.3438, 56.25), (85.9375, 43.75), (93.75, 25), (100, 0))
    r   rX   Néÿÿÿÿ)r†   r¥   )
r,   r-   r.   r/   r§   re   rf   r¡   ra   Úsplits
             r1   r   r   e  sp   € ô( % S¨#¨s°CÓ8�J€A€qˆ!ˆQÜ˜1˜a  AÐ+¨Ò+€Eð
 Ð#�e˜A‘h˜q˜r�lÑ#€Eˆ!�HØ&�%˜‘)˜C˜R�.Ð& #Ñ&€Eˆ"�IØ€Lr2   )r,   r-   r.   r/   re   rf   r¡   ra   c              '   ód   K  — t        | |||«      \  }}}}t        ||||g|¢­Ž E d{  –—†  y7 Œ­w)a  Split a cubic Bezier curve at one or more values of t.

    Args:
        pt1,pt2,pt3,pt4: Control points of the Bezier as complex numbers..
        *ts: Positions at which to split the curve.

    Yields:
        Curve segments (each curve segment being four complex numbers).
    N)ÚcalcCubicParametersCÚ_splitCubicAtTC)	r,   r-   r.   r/   r§   re   rf   r¡   ra   s	            r1   r   r   „  s9   è ø€ ô( & c¨3°°SÓ9�J€A€qˆ!ˆQÜ˜q ! Q¨Ð/¨BÒ/×/Ò/ús   ‚&0¨.©0)r~   r,   r-   r.   r/   ÚpointAtTÚoff1Úoff2)r   Ú_1_tÚ_1_t_2Ú_2_t_1_tc                 ó  — ||z  }d|z
  }||z  }d|z  |z  }||z  | z  d||z  |z  ||z  |z  z   z  z   ||z  |z  z   }	|| z  ||z  z   ||z  z   }
||z  ||z  z   ||z  z   }| || z
  |z  z   }|||z
  |z  z   }| ||
|	f|	|||ffS )a  Split a cubic Bezier curve at t.

    Args:
        pt1,pt2,pt3,pt4: Control points of the Bezier as complex numbers.
        t: Position at which to split the curve.

    Returns:
        A tuple of two curve segments (each curve segment being four complex numbers).
    rX   rW   r4   r6   )r,   r-   r.   r/   r~   r   r±   r²   r³   r®   r¯   r°   s               r1   r   r   œ  så   € ð0 
ˆQ‰€BØˆq‰5€DØ�D‰[€FØ�1‰u�t‰|€Hà�‰˜Ñ˜a 6¨A¡:°Ñ#3°d¸R±iÀ#±oÑ#EÑFÑFÈÈaÉÐRUÉÑUð ð �C‰<˜( S™.Ñ(¨2°©8Ñ3€DØ�C‰<˜( S™.Ñ(¨2°©8Ñ3€Dà
��s‘˜a‘Ñ
€CØ
��s‘˜dÑ"Ñ
"€Cà�#�t˜XÐ&¨°4¸¸cÐ(BÐCÐCr2   c                 óÎ  — t        |«      }g }|j                  dd«       |j                  d«       | \  }}|\  }}|\  }	}
t        t	        |«      dz
  «      D ]‹  }||   }||dz      }||z
  }||z  }||z  }||z  }d|z  |z  |z   |z  }d|z  |z  |z   |z  }||z  }||z  ||z  z   |	z   }||z  ||z  z   |
z   }t        ||f||f||f«      \  }}}|j                  |||f«       Œ� |S )Nr   rk   rJ   rX   rW   )ÚlistÚinsertrt   ÚrangeÚlenÚcalcQuadraticPoints)re   rf   r¡   r§   Úsegmentsru   rv   rw   rx   ry   rz   Úir   r   ÚdeltaÚdelta_2Úa1xÚa1yÚb1xÚb1yÚt1_2Úc1xÚc1yr,   r-   r.   s                             r1   r    r    Ä  s8  € Ü	ˆb‹€BØ€HØ‡I�Iˆa�ÔØ‡I�Iˆc„NØ�F€BˆØ�F€BˆØ�F€BˆÜ”3�r“7˜Q‘;Óò )ˆØ�‰UˆØ��A‘‰YˆØ�R‘ˆà˜%‘-ˆØ�7‰lˆØ�7‰lˆØ�2‰v˜‰{˜RÑ 5Ñ(ˆØ�2‰v˜‰{˜RÑ 5Ñ(ˆØ�B‰wˆØ�4‰i˜"˜r™'Ñ! BÑ&ˆØ�4‰i˜"˜r™'Ñ! BÑ&ˆä+¨S°#¨J¸¸c¸
ÀSÈ#ÀJÓO‰ˆˆS�#Ø�‰˜˜c 3˜Õ(ð)ð  €Or2   c                 ój  — t        |«      }|j                  dd«       |j                  d«       g }| \  }}|\  }}	|\  }
}|\  }}t        t	        |«      dz
  «      D ]Ô  }||   }||dz      }||z
  }||z  }||z  }||z  }||z  }||z  }||z  }d|z  |z  |z   |z  }d|z  |z  |	z   |z  }d|z  |z  |
z   d|z  |z  z   |z  }d|	z  |z  |z   d|z  |z  z   |z  }||z  ||z  z   |
|z  z   |z   }||z  |	|z  z   ||z  z   |z   }t        ||f||f||f||f«      \  }}} }!|j                  ||| |!f«       ŒÖ |S ©Nr   rk   rJ   rX   r4   rW   )r¶   r·   rt   r¸   r¹   ÚcalcCubicPoints)"re   rf   r¡   ra   r§   r»   ru   rv   rw   rx   ry   rz   r‡   rˆ   r¼   r   r   r½   r¾   Údelta_3rÃ   Út1_3r¿   rÀ   rÁ   rÂ   rÄ   rÅ   Úd1xÚd1yr,   r-   r.   r/   s"                                     r1   r¥   r¥   ß  sÀ  € Ü	ˆb‹€BØ‡I�Iˆa�ÔØ‡I�Iˆc„NØ€HØ�F€BˆØ�F€BˆØ�F€BˆØ�F€BˆÜ”3�r“7˜Q‘;Óò .ˆØ�‰UˆØ��A‘‰YˆØ�R‘ˆà˜%‘-ˆØ˜'‘/ˆØ�B‰wˆØ�D‰yˆð �7‰lˆØ�7‰lˆØ�2‰v˜‰{˜RÑ 7Ñ*ˆØ�2‰v˜‰{˜RÑ 7Ñ*ˆØ�2‰v˜‰{˜RÑ ! b¡&¨4¡-Ñ/°5Ñ8ˆØ�2‰v˜‰{˜RÑ ! b¡&¨4¡-Ñ/°5Ñ8ˆØ�4‰i˜"˜t™)Ñ# b¨2¡gÑ-°Ñ2ˆØ�4‰i˜"˜t™)Ñ# b¨2¡gÑ-°Ñ2ˆÜ,Ø�#ˆJ˜˜c˜
 S¨# J°°c°
ó
ÑˆˆS�#�sð 	�‰˜˜c 3¨Ð,Õ-ð-.ð. €Or2   )re   rf   r¡   ra   r   r   r½   r¾   rÉ   Úa1Úb1Úc1r`   c              '   óž  K  — t        |«      }|j                  dd«       |j                  d«       t        t	        |«      dz
  «      D ]�  }||   }||dz      }||z
  }||z  }	||	z  }
||z  }||z  }| |
z  }d| z  |z  |z   |	z  }d|z  |z  |z   d| z  |z  z   |z  }| |z  ||z  z   ||z  z   |z   }t        ||||«      \  }}}}||||f–— Œƒ y ­wrÇ   )r¶   r·   rt   r¸   r¹   ÚcalcCubicPointsC)re   rf   r¡   ra   r§   r¼   r   r   r½   r¾   rÉ   rÃ   rÊ   rÍ   rÎ   rÏ   r`   r,   r-   r.   r/   s                        r1   r­   r­     s  è ø€ ô  
ˆb‹€BØ‡I�Iˆa�ÔØ‡I�Iˆc„NÜ”3�r“7˜Q‘;Óò #ˆØ�‰UˆØ��A‘‰YˆØ�R‘ˆà˜%‘-ˆØ˜'‘/ˆØ�B‰wˆØ�D‰yˆð �‰[ˆØ�!‰e�b‰j˜1‰n Ñ'ˆØ�!‰e�b‰j˜1‰n˜q 1™u t™|Ñ+¨uÑ4ˆØ�‰X˜˜D™Ñ  1 r¡6Ñ)¨AÑ-ˆÜ-¨b°"°b¸"Ó=ÑˆˆS�#�sØ�C˜˜cÐ"Ó"ñ!#ùs   ‚CC)rZ   ÚacosÚcosÚpic                 óÖ   — t        | «      t        k  rt        |«      t        k  rg }|S | |z  g}|S ||z  d| z  |z  z
  }|dk\  r" ||«      }| |z   dz  | z  | |z
  dz  | z  g}|S g }|S )uK  Solve a quadratic equation.

    Solves *a*x*x + b*x + c = 0* where a, b and c are real.

    Args:
        a: coefficient of *xÂ²*
        b: coefficient of *x*
        c: constant term

    Returns:
        A list of roots. Note that the returned list is neither guaranteed to
        be sorted nor to contain unique values!
    ç      @rk   rr   ©rC   rl   )re   rf   r¡   rZ   r}   ÚDDÚrDDs          r1   r   r   /  s£   € ô ˆ1ƒv”ÒÜˆq‹6”GÒàˆEð €Lð �R˜!‘V�HˆEð €Lð �‰U�S˜1‘W˜q‘[Ñ ˆØ�Š9Ù�r“(ˆCØ�b˜3‘h #Ñ%¨Ñ)¨Q¨B°©H¸Ñ+;¸aÑ+?Ð@ˆEð €Lð ˆEØ€Lr2   c           
      ó  — t        | «      t        k  rt        |||«      S t        | «      } || z  }|| z  }|| z  }||z  d|z  z
  dz  }d|z  |z  |z  d|z  |z  z
  d|z  z   dz  }||z  }	||z  |z  }
|	t        k  rdn|	}	t        |
«      t        k  rdn|
}
|	|
z
  }|	dk(  r|
dk(  rt	        | dz  t
        «      }|||gS |t        dz  k  �rut        t        t        |t        |
«      z  d	«      d
«      «      }dt        |«      z  }|dz  }|t        |dz  «      z  |z
  }|t        |dt        z  z   dz  «      z  |z
  }|t        |dt        z  z   dz  «      z  |z
  }t        |||g«      \  }}}||z
  t        k  r*||z
  t        k  rt	        ||z   |z   dz  t
        «      x}x}}nš||z
  t        k  r)t	        ||z   dz  t
        «      x}}t	        |t
        «      }ne||z
  t        k  r)t	        |t
        «      }t	        ||z   dz  t
        «      x}}n0t	        |t
        «      }t	        |t
        «      }t	        |t
        «      }|||gS t        t        |«      t        |«      z   d«      }|||z  z   }|dk\  r| }t	        ||dz  z
  t
        «      }|gS )ut  Solve a cubic equation.

    Solves *a*x*x*x + b*x*x + c*x + d = 0* where a, b, c and d are real.

    Args:
        a: coefficient of *xÂ³*
        b: coefficient of *xÂ²*
        c: coefficient of *x*
        d: constant term

    Returns:
        A list of roots. Note that the returned list is neither guaranteed to
        be sorted nor to contain unique values!

    Examples::

        >>> solveCubic(1, 1, -6, 0)
        [-3.0, -0.0, 2.0]
        >>> solveCubic(-10.0, -9.0, 48.0, -29.0)
        [-2.9, 1.0, 1.0]
        >>> solveCubic(-9.875, -9.0, 47.625, -28.75)
        [-2.911392, 1.0, 1.0]
        >>> solveCubic(1.0, -4.5, 6.75, -3.375)
        [1.5, 1.5, 1.5]
        >>> solveCubic(-12.0, 18.0, -9.0, 1.50023651123)
        [0.5, 0.5, 0.5]
        >>> solveCubic(
        ...     9.0, 0.0, 0.0, -7.62939453125e-05
        ... ) == [-0.0, -0.0, -0.0]
        True
    r…   g      "@rr   g      ;@g      K@r   rk   r5   rJ   g      ð¿g       ÀrÖ   çUUUUUUÕ?)rC   rl   r   ÚfloatÚroundÚepsilonDigitsrÒ   ÚmaxÚminrZ   rÓ   rÔ   rŸ   Úpow)re   rf   r¡   ra   rÍ   Úa2Úa3ÚQÚRÚR2ÚQ3ÚR2_Q3rU   ÚthetaÚrQ2Úa1_3rg   rh   Úx2s                      r1   r    r    P  sÂ  € ôL ˆ1ƒv”Òô ˜a  AÓ&Ð&Üˆa‹€AØ	
ˆQ‰€BØ	
ˆQ‰€BØ	
ˆQ‰€Bà	ˆb‰�3˜‘8Ñ	˜sÑ"€AØ	ˆr‰�B‰˜Ñ	˜c B™h¨™mÑ	+¨d°R©iÑ	7¸4Ñ?€Aà	
ˆQ‰€BØ	
ˆQ‰�‰€BØ”7Šl‰ €BÜ�"‹gœÒ‰ R€Bà�‰G€Eà	ˆS‚y�R˜3’YÜ�2�#˜‘)œ]Ó+ˆØ�1�aˆyÐØ	”'˜C‘-Ó	ä”Sœ˜Q¤ b£™\¨3Ó/°Ó6Ó7ˆØ”T˜!“W‰nˆØ�C‰xˆØ”3�u˜s‘{Ó#Ñ# dÑ*ˆØ”3˜ ¤b¡Ñ(¨CÑ/Ó0Ñ0°4Ñ7ˆØ”3˜ ¤b¡Ñ(¨CÑ/Ó0Ñ0°4Ñ7ˆÜ˜R  R˜LÓ)‰
ˆˆB�à�‰7”WÒ  b¡¬7Ò!2Ü  " r¡'¨B¡,°#Ñ!5´}ÓEÐEˆBÐE�‘bØ�"‰W”wÒÜ˜R "™W¨™O¬]Ó;Ð;ˆB�Ü�rœ=Ó)‰BØ�"‰W”wÒÜ�rœ=Ó)ˆBÜ˜R "™W¨™O¬]Ó;Ð;ˆB‘ä�rœ=Ó)ˆBÜ�rœ=Ó)ˆBÜ�rœ=Ó)ˆBØ�B˜ˆ|Ðä”�U“œc !›fÑ$ gÓ.ˆØ��A‘‰IˆØ�Š8Ø�ˆAÜ�!�b˜3‘h‘,¤Ó.ˆØˆsˆ
r2   c                 óv   — |\  }}|\  }}| \  }}||z
  dz  }	||z
  dz  }
||z
  |	z
  }||z
  |
z
  }||f|	|
f||ffS )Nrr   r6   )r,   r-   r.   rì   Úy2Úx3Úy3ry   rz   rw   rx   ru   rv   s                r1   rs   rs   ±  sj   € Ø�F€BˆØ�F€BˆØ�F€BˆØ
ˆr‰'�S‰€BØ
ˆr‰'�S‰€BØ	ˆb‰�2‰€BØ	ˆb‰�2‰€BØ�ˆ8�b˜"�X  B˜xÐ'Ð'r2   c                 ó¾   — |\  }}|\  }}|\  }}	| \  }
}||
z
  dz  }||z
  dz  }||z
  dz  |z
  }||z
  dz  |z
  }||
z
  |z
  |z
  }|	|z
  |z
  |z
  }||f||f||f|
|ffS ©Nr…   r6   )r,   r-   r.   r/   rì   rî   rï   rð   Úx4Úy4r‡   rˆ   ry   rz   rw   rx   ru   rv   s                     r1   r†   r†   ¼  s§   € Ø�F€BˆØ�F€BˆØ�F€BˆØ�F€BˆØ
ˆr‰'�S‰€BØ
ˆr‰'�S‰€BØ
ˆr‰'�S‰˜2Ñ	€BØ
ˆr‰'�S‰˜2Ñ	€BØ	ˆb‰�2‰˜Ñ	€BØ	ˆb‰�2‰˜Ñ	€BØ�ˆ8�b˜"�X  B˜x¨"¨b¨Ð1Ð1r2   )r,   r-   r.   r/   re   rf   r¡   c                 óJ   — || z
  dz  }||z
  dz  |z
  }|| z
  |z
  |z
  }|||| fS rò   r6   )r,   r-   r.   r/   r¡   rf   re   s          r1   r¬   r¬   Ê  sE   € ð 
ˆs‰�cÑ€AØ	ˆs‰�cÑ˜AÑ€AØˆc‰	�A‰˜Ñ€AØˆq�!�Sˆ>Ðr2   c                 ó~   — | \  }}|\  }}|\  }}|}	|}
|dz  |z   }|dz  |z   }||z   |z   }||z   |z   }|	|
f||f||ffS rB   r6   )re   rf   r¡   ru   rv   rw   rx   ry   rz   rh   Úy1rì   rî   rï   rð   s                  r1   rº   rº   Ü  st   € Ø�F€BˆØ�F€BˆØ�F€BˆØ	€BØ	€BØ
ˆs‰(�b‰€BØ
ˆs‰(�b‰€BØ	ˆb‰�2‰€BØ	ˆb‰�2‰€BØ�ˆ8�b˜"�X  B˜xÐ'Ð'r2   c                 óÆ   — | \  }}|\  }}|\  }}	|\  }
}|
}|}|dz  |
z   }|	dz  |z   }||z   dz  |z   }||	z   dz  |z   }||
z   |z   |z   }||z   |	z   |z   }||f||f||f||ffS rò   r6   )re   rf   r¡   ra   ru   rv   rw   rx   ry   rz   r‡   rˆ   rh   r÷   rì   rî   rï   rð   ró   rô   s                       r1   rÈ   rÈ   é  s±   € Ø�F€BˆØ�F€BˆØ�F€BˆØ�F€BˆØ	€BØ	€BØ
ˆs‰(�b‰€BØ
ˆs‰(�b‰€BØ
ˆr‰'�S‰˜2Ñ	€BØ
ˆr‰'�S‰˜2Ñ	€BØ	ˆb‰�2‰˜Ñ	€BØ	ˆb‰�2‰˜Ñ	€BØ�ˆ8�b˜"�X  B˜x¨"¨b¨Ð1Ð1r2   ©re   rf   r¡   ra   r9   r:   Úp4c                 óJ   — |dz  |z   }||z   dz  |z   }| |z   |z   |z   }||||fS )NrÛ   r6   rù   s          r1   rÑ   rÑ   ù  sC   € ð 
ˆe‰�q‰€BØ
ˆa‰%�EÑ	˜RÑ	€BØ	
ˆQ‰�‰�Q‰€BØˆr�2�rˆ?Ðr2   c                 óR   — | d   d|z
  z  |d   |z  z   | d   d|z
  z  |d   |z  z   fS )zÖFinds the point at time `t` on a line.

    Args:
        pt1, pt2: Coordinates of the line as 2D tuples.
        t: The time along the line.

    Returns:
        A 2D tuple with the coordinates of the point.
    r   rX   r6   )r,   r-   r~   s      r1   r$   r$     sC   € ð �‰V�q˜1‘uÑ  A¡¨¡
Ñ*¨c°!©f¸¸A¹Ñ.>ÀÀQÁÈ!ÁÑ.KÐMÐMr2   c                 óÆ   — d|z
  d|z
  z  | d   z  dd|z
  z  |z  |d   z  z   ||z  |d   z  z   }d|z
  d|z
  z  | d   z  dd|z
  z  |z  |d   z  z   ||z  |d   z  z   }||fS )zèFinds the point at time `t` on a quadratic curve.

    Args:
        pt1, pt2, pt3: Coordinates of the curve as 2D tuples.
        t: The time along the curve.

    Returns:
        A 2D tuple with the coordinates of the point.
    rX   r   rW   r6   )r,   r-   r.   r~   rU   Úys         r1   r!   r!     s™   € ð 
ˆQ‰�1�q‘5Ñ˜C ™FÑ" Q¨!¨a©%¡[°1¡_°s¸1±vÑ%=Ñ=ÀÀAÁÈÈAÉÁÑN€AØ	
ˆQ‰�1�q‘5Ñ˜C ™FÑ" Q¨!¨a©%¡[°1¡_°s¸1±vÑ%=Ñ=ÀÀAÁÈÈAÉÁÑN€AØˆqˆ6€Mr2   c                 óð   — ||z  }d|z
  }||z  }||z  | d   z  d||z  |d   z  ||z  |d   z  z   z  z   ||z  |d   z  z   }||z  | d   z  d||z  |d   z  ||z  |d   z  z   z  z   ||z  |d   z  z   }	||	fS )zéFinds the point at time `t` on a cubic curve.

    Args:
        pt1, pt2, pt3, pt4: Coordinates of the curve as 2D tuples.
        t: The time along the curve.

    Returns:
        A 2D tuple with the coordinates of the point.
    rX   r   r4   r6   )
r,   r-   r.   r/   r~   r   r±   r²   rU   rþ   s
             r1   r"   r"   ,  sÖ   € ð 
ˆQ‰€BØˆq‰5€DØ�D‰[€Fà�‰˜˜A™ÑØ
ˆv˜‰z˜C ™FÑ" T¨B¡Y°°Q±Ñ%7Ñ7Ñ
8ñ	9à
ˆq‰&�3�q‘6‰/ñ	ð ð 	�‰˜˜A™ÑØ
ˆv˜‰z˜C ™FÑ" T¨B¡Y°°Q±Ñ%7Ñ7Ñ
8ñ	9à
ˆq‰&�3�q‘6‰/ñ	ð ð
 ˆqˆ6€Mr2   )r~   r,   r-   r.   r/   )r   r±   r²   c                 ól   — ||z  }d|z
  }||z  }||z  | z  d||z  |z  ||z  |z  z   z  z   ||z  |z  z   S )zõFinds the point at time `t` on a cubic curve.

    Args:
        pt1, pt2, pt3, pt4: Coordinates of the curve as complex numbers.
        t: The time along the curve.

    Returns:
        A complex number with the coordinates of the point.
    rX   r4   r6   )r,   r-   r.   r/   r~   r   r±   r²   s           r1   r#   r#   F  s]   € ð& 
ˆQ‰€BØˆq‰5€DØ�D‰[€FØ�D‰=˜3Ñ  f¨q¡j°3Ñ&6¸À¹ÀS¹Ñ&HÑ!IÑIÈBÐQRÉFÐUXÉLÑXÐXr2   c                 óº   — t        | «      dk(  rt        g | ¢|‘­Ž S t        | «      dk(  rt        g | ¢|‘­Ž S t        | «      dk(  rt        g | ¢|‘­Ž S t	        d«      ‚©NrW   r4   é   úUnknown curve degree)r¹   r$   r!   r"   Ú
ValueError)Úsegr~   s     r1   r%   r%   _  sh   € Ü
ˆ3ƒx�1‚}ÜÐ$˜SÐ$ !Ò$Ð$Ü	ˆS‹�QŠÜ Ð) #Ð) qÒ)Ð)Ü	ˆS‹�QŠÜÐ%˜cÐ% 1Ò%Ð%Ü
Ð+Ó
,Ð,r2   c                 óÜ   — | \  }}|\  }}|\  }}t        ||z
  «      t        k  rt        ||z
  «      t        k  ryt        ||z
  «      t        ||z
  «      kD  r||z
  ||z
  z  S ||z
  ||z
  z  S )Nr©   r×   )	ÚsÚer   ÚsxÚsyÚexÚeyÚpxÚpys	            r1   Ú_line_t_of_ptr  n  s}   € Ø�F€BˆØ�F€BˆØ�F€BˆÜ
ˆ2�‰7ƒ|”gÒ¤# b¨2¡g£,´Ò"8àä
ˆ2�‰7ƒ|”c˜"˜r™'“lÒ"Ø�R‘˜B ™GÑ$Ð$à�R‘˜B ™GÑ$Ð$r2   c                 óx   — | d   |d   z
  |d   |d   z
  z  }| d   |d   z
  |d   |d   z
  z  }|dk  xr |dk   S )Nr   rX   rk   r6   )re   rf   ÚoriginÚxDiffÚyDiffs        r1   Ú'_both_points_are_on_same_side_of_originr  |  s`   € Øˆq‰T�F˜1‘IÑ ! A¡$¨°©Ñ"2Ñ3€EØˆq‰T�F˜1‘IÑ ! A¡$¨°©Ñ"2Ñ3€EØ˜‘Ò- ¨#¡Ð.Ð.r2   c           	      óx  — | \  }}|\  }}|\  }}	|\  }
}t        j                  ||
«      r.t        j                  ||«      rt        j                  ||«      sg S t        j                  |	|«      r.t        j                  ||«      rt        j                  ||	«      sg S t        j                  ||
«      rt        j                  |	|«      rg S t        j                  ||«      rt        j                  ||«      rg S t        j                  ||«      rA|}||	z
  |
|z
  z  }|||z
  z  |	z   }||f}t        |t        | ||«      t        |||«      ¬«      gS t        j                  ||
«      rA|}||z
  ||z
  z  }|||z
  z  |z   }||f}t        |t        | ||«      t        |||«      ¬«      gS ||z
  ||z
  z  }||	z
  |
|z
  z  }t        j                  ||«      rg S ||z  |z
  ||z  z
  |	z   ||z
  z  }|||z
  z  |z   }||f}t	        ||| «      r2t	        |||«      r%t        |t        | ||«      t        |||«      ¬«      gS g S )aí  Finds intersections between two line segments.

    Args:
        s1, e1: Coordinates of the first line as 2D tuples.
        s2, e2: Coordinates of the second line as 2D tuples.

    Returns:
        A list of ``Intersection`` objects, each object having ``pt``, ``t1``
        and ``t2`` attributes containing the intersection point, time on first
        segment and time on second segment respectively.

    Examples::

        >>> a = lineLineIntersections( (310,389), (453, 222), (289, 251), (447, 367))
        >>> len(a)
        1
        >>> intersection = a[0]
        >>> intersection.pt
        (374.44882952482897, 313.73458370177315)
        >>> (intersection.t1, intersection.t2)
        (0.45069111555824465, 0.5408153767394238)
    r
   )rY   Úiscloser	   r  r  )Ús1Úe1Ús2Úe2Ús1xÚs1yÚe1xÚe1yÚs2xÚs2yÚe2xÚe2yrU   Úslope34rþ   r   Úslope12s                    r1   r&   r&   ‚  sf  € ð. �H€CˆØ�H€CˆØ�H€CˆØ�H€Cˆä�‰�S˜#Ô¤4§<¡<°°SÔ#9Ä$Ç,Á,ÈsÐTWÔBXàˆ	ä�‰�S˜#Ô¤4§<¡<°°SÔ#9Ä$Ç,Á,ÈsÐTWÔBXàˆ	Ü‡|�|�C˜Ô¤$§,¡,¨s°CÔ"8Øˆ	Ü‡|�|�C˜Ô¤$§,¡,¨s°CÔ"8Øˆ	Ü‡|�|�C˜ÔØˆØ˜‘9  s¡Ñ+ˆØ�q˜3‘wÑ #Ñ%ˆØ�ˆVˆäØœ-¨¨B°Ó3¼ÀbÈ"ÈbÓ8Qôð
ð 	
ô
 ‡|�|�C˜ÔØˆØ˜‘9  s¡Ñ+ˆØ�q˜3‘wÑ #Ñ%ˆØ�ˆVˆäØœ-¨¨B°Ó3¼ÀbÈ"ÈbÓ8Qôð
ð 	
ð �S‰y˜S 3™YÑ'€GØ�S‰y˜S 3™YÑ'€GÜ‡|�|�G˜WÔ%Øˆ	Ø	�3‰˜Ñ	˜w¨™}Ñ	,¨sÑ	2°wÀÑ7HÑI€AØ�1�s‘7Ñ˜cÑ!€AØ
ˆQˆ€BÜ.Ø
ˆB�ôä
1°"°b¸"Ô
=äØœ-¨¨B°Ó3¼ÀbÈ"ÈbÓ8Qôð
ð 	
ð
 €Ir2   c                 óÂ   — | d   }| d   }t        j                  |d   |d   z
  |d   |d   z
  «      }t        j                  | «      j	                  |d    |d    «      S )Nr   r©   rX   )rY   Úatan2r   ÚrotateÚ	translate)ÚsegmentÚstartÚendÚangles       r1   Ú_alignment_transformationr.  Ð  sj   € ð �A‰J€EØ
�"‰+€CÜ�J‰J�s˜1‘v  a¡Ñ(¨#¨a©&°5¸±8Ñ*;Ó<€EÜ�?‰?˜E˜6Ó"×,Ñ,¨e°A©h¨Y¸¸q¹¸	ÓBÐBr2   c                 ó>  — t        |«      j                  | «      }t        | «      dk(  r#t        |Ž \  }}}t	        |d   |d   |d   «      }nAt        | «      dk(  r(t        |Ž \  }}}}t        |d   |d   |d   |d   «      }nt        d«      ‚t        d„ |D «       «      S )Nr4   rX   r  r  c              3   ó>   K  — | ]  }d |cxk  rdk  sŒn n|–— Œ y­w)rk   rX   Nr6   )r›   r¼   s     r1   rœ   z._curve_line_intersections_t.<locals>.<genexpr>ä  s   è ø€ Ò<˜¨c°Q¬m¸!®m”!Ñ<ùrž   )	r.  ÚtransformPointsr¹   rs   r   r†   r    r  rŸ   )ÚcurveÚlineÚaligned_curvere   rf   r¡   Úintersectionsra   s           r1   Ú_curve_line_intersections_tr6  Ú  s¦   € Ü-¨dÓ3×CÑCÀEÓJ€MÜ
ˆ5ƒz�Q‚Ü)¨=Ð9‰ˆˆ1ˆaÜ& q¨¡t¨Q¨q©T°1°Q±4Ó8‰Ü	ˆU‹�qŠÜ(¨-Ð8‰
ˆˆ1ˆa�Ü" 1 Q¡4¨¨1©¨q°©t°Q°q±TÓ:‰äÐ/Ó0Ð0ÜÑ<˜]Ô<Ó<Ð<r2   c                 ó  — t        | «      dk(  rt        }n t        | «      dk(  rt        }nt        d«      ‚g }t	        | |«      D ]C  } |g | ¢|‘­Ž }t        g |¢|‘­Ž }t        g |¢|‘­Ž }|j                  t        |||¬«      «       ŒE |S )aæ  Finds intersections between a curve and a line.

    Args:
        curve: List of coordinates of the curve segment as 2D tuples.
        line: List of coordinates of the line segment as 2D tuples.

    Returns:
        A list of ``Intersection`` objects, each object having ``pt``, ``t1``
        and ``t2`` attributes containing the intersection point, time on first
        segment and time on second segment respectively.

    Examples::
        >>> curve = [ (100, 240), (30, 60), (210, 230), (160, 30) ]
        >>> line  = [ (25, 260), (230, 20) ]
        >>> intersections = curveLineIntersections(curve, line)
        >>> len(intersections)
        3
        >>> intersections[0].pt
        (84.9000930760723, 189.87306176459828)
    r4   r  r  r
   )	r¹   r!   r"   r  r6  r  r$   rt   r	   )r2  r3  ÚpointFinderr5  r~   r   Úline_ts          r1   r'   r'   ç  s¤   € ô* ˆ5ƒz�Q‚Ü'‰Ü	ˆU‹�qŠÜ#‰äÐ/Ó0Ð0Ø€MÜ(¨°Ó5ò CˆÙÐ#˜%Ð# Ò#ˆô Ð) Ð) bÒ)ˆÜÐ(˜4Ð( Ò(ˆØ×Ñœ\¨R°A¸&ÔAÕBðCð Ðr2   c                 óp   — t        | «      dk(  rt        | Ž S t        | «      dk(  rt        | Ž S t        d«      ‚)Nr4   r  r  )r¹   r   r   r  )r¡   s    r1   Ú_curve_boundsr;    s:   € Ü
ˆ1ƒv�‚{Ü" AÐ&Ð&Ü	ˆQ‹�1ŠÜ Ð"Ð"Ü
Ð+Ó
,Ð,r2   c                 óÔ   — t        | «      dk(  r| \  }}t        |||«      }||f||fgS t        | «      dk(  rt        g | ¢|‘­Ž S t        | «      dk(  rt        g | ¢|‘­Ž S t	        d«      ‚r  )r¹   r$   r   r   r  )r¡   r~   r  r	  Úmidpoints        r1   Ú_split_segment_at_tr>    s   € Ü
ˆ1ƒv�‚{Ø‰ˆˆ1Ü  1 aÓ(ˆØ�H� ¨!˜}Ð-Ð-Ü
ˆ1ƒv�‚{Ü Ð' !Ð' QÒ'Ð'Ü	ˆQ‹�1ŠÜÐ#˜aÐ# Ò#Ð#Ü
Ð+Ó
,Ð,r2   c           	      óø  ‡— t        | «      }t        |«      }|sd}|sd}t        ||«      \  }}|sg S d„ }	t        |«      ‰k  rt        |«      ‰k  r |	|«       |	|«      fgS t        | d«      \  }
}|d    |	|«      f} |	|«      |d   f}t        |d«      \  }}|d    |	|«      f} |	|«      |d   f}g }|j	                  t        |
|‰||¬«      «       |j	                  t        ||‰||¬«      «       |j	                  t        |
|‰||¬«      «       |j	                  t        ||‰||¬«      «       ˆfd„}t        «       }g }|D ]1  } ||«      }||v rŒ|j                  |«       |j                  |«       Œ3 |S )N)rk   rJ   c                 ó   — d| d   | d   z   z  S )Nr5   r   rX   r6   )Úrs    r1   r=  z._curve_curve_intersections_t.<locals>.midpoint1  s   € Ø�a˜‘d˜Q˜q™T‘kÑ"Ð"r2   r5   r   rX   )Úrange1Úrange2c                 óH   •— t        | d   ‰z  «      t        | d   ‰z  «      fS )Nr   rX   )Úint)r§   Ú	precisions    €r1   ú<lambda>z._curve_curve_intersections_t.<locals>.<lambda>V  s(   ø€ œS  A¡¨Ñ!2Ó3´S¸¸A¹ÀÑ9JÓ5KÐL€ r2   )	r;  r   r   r>  ÚextendÚ_curve_curve_intersections_tÚsetÚaddrt   )Úcurve1Úcurve2rF  rB  rC  Úbounds1Úbounds2Ú
intersectsÚ_r=  Úc11Úc12Ú	c11_rangeÚ	c12_rangeÚc21Úc22Ú	c21_rangeÚ	c22_rangeÚfoundÚ
unique_keyÚseenÚunique_valuesr§   Úkeys     `                     r1   rI  rI  !  sÅ  ø€ ô ˜FÓ#€GÜ˜FÓ#€GáØˆÙØˆô ˜W gÓ.�M€J�ÙØˆ	ò#ô �Ó˜9Ò$¬°'Ó):¸YÒ)FÙ˜&Ó!¡8¨FÓ#3Ð4Ð5Ð5ä" 6¨3Ó/�H€CˆØ˜‘™H VÓ,Ð-€IÙ˜&Ó! 6¨!¡9Ð-€Iä" 6¨3Ó/�H€CˆØ˜‘™H VÓ,Ð-€IÙ˜&Ó! 6¨!¡9Ð-€Ià€EØ	‡L�LÜ$Ø��i¨	¸)ô	
ôð
 
‡L�LÜ$Ø��i¨	¸)ô	
ôð
 
‡L�LÜ$Ø��i¨	¸)ô	
ôð
 
‡L�LÜ$Ø��i¨	¸)ô	
ôó M€JÜ‹5€DØ€Màò !ˆÙ˜‹nˆØ�$‰;ØØ�‰�ŒØ×Ñ˜RÕ ð!ð Ðr2   c                 óZ   — t        | «      j                  | «      }t        d„ |D «       «      S )Nc              3   óN   K  — | ]  }t        j                  |d    d«      –— Œ y­w)rX   rk   N)rY   r  )r›   Úps     r1   rœ   z_is_linelike.<locals>.<genexpr>f  s   è ø€ Ò:¨1Œt�|‰|˜A˜a™D #×&Ñ:ùs   ‚#%)r.  r1  Úall)r*  Ú	maybelines     r1   Ú_is_linelikerd  d  s(   € Ü)¨'Ó2×BÑBÀ7ÓK€IÜÑ:°	Ô:Ó:Ð:r2   c           
      óJ  — t        | «      r8| d   | d   f}t        |«      r|d   |d   f}t        g |¢|¢­Ž S t        ||«      S t        |«      r|d   |d   f}t        | |«      S t        | |«      }|D �cg c]#  }t	        t        | |d   «      |d   |d   ¬«      ‘Œ% c}S c c}w )a  Finds intersections between a curve and a curve.

    Args:
        curve1: List of coordinates of the first curve segment as 2D tuples.
        curve2: List of coordinates of the second curve segment as 2D tuples.

    Returns:
        A list of ``Intersection`` objects, each object having ``pt``, ``t1``
        and ``t2`` attributes containing the intersection point, time on first
        segment and time on second segment respectively.

    Examples::
        >>> curve1 = [ (10,100), (90,30), (40,140), (220,220) ]
        >>> curve2 = [ (5,150), (180,20), (80,250), (210,190) ]
        >>> intersections = curveCurveIntersections(curve1, curve2)
        >>> len(intersections)
        3
        >>> intersections[0].pt
        (81.7831487395506, 109.88904552375288)
    r   r©   rX   r
   )rd  r&   r'   rI  r	   r%   )rL  rM  Úline1Úline2Úintersection_tsr§   s         r1   r(   r(   i  sÉ   € ô* �FÔØ�q‘	˜6 "™:Ð%ˆÜ˜ÔØ˜1‘I˜v b™zÐ)ˆEÜ(Ð8¨%Ð8°%Ò8Ð8ä)¨&°%Ó8Ð8Ü	�fÔ	Ø�q‘	˜6 "™:Ð%ˆÜ% f¨eÓ4Ð4ä2°6¸6ÓB€Oð "öàô 	œ¨°°1±Ó6¸2¸a¹5ÀRÈÁUÖKòð ùò s   Á5(B c                 óœ  — d}t        |«      t        | «      kD  r| |} }d}t        | «      dkD  r(t        |«      dkD  rt        | |«      }nBt        | |«      }n5t        | «      dk(  rt        |«      dk(  rt        g | ¢|¢­Ž }nt	        d«      ‚|s|S |D �cg c].  }t        |j                  |j                  |j                  ¬«      ‘Œ0 c}S c c}w )a)  Finds intersections between two segments.

    Args:
        seg1: List of coordinates of the first segment as 2D tuples.
        seg2: List of coordinates of the second segment as 2D tuples.

    Returns:
        A list of ``Intersection`` objects, each object having ``pt``, ``t1``
        and ``t2`` attributes containing the intersection point, time on first
        segment and time on second segment respectively.

    Examples::
        >>> curve1 = [ (10,100), (90,30), (40,140), (220,220) ]
        >>> curve2 = [ (5,150), (180,20), (80,250), (210,190) ]
        >>> intersections = segmentSegmentIntersections(curve1, curve2)
        >>> len(intersections)
        3
        >>> intersections[0].pt
        (81.7831487395506, 109.88904552375288)
        >>> curve3 = [ (100, 240), (30, 60), (210, 230), (160, 30) ]
        >>> line  = [ (25, 260), (230, 20) ]
        >>> intersections = segmentSegmentIntersections(curve3, line)
        >>> len(intersections)
        3
        >>> intersections[0].pt
        (84.9000930760723, 189.87306176459828)

    FTrW   z4Couldn't work out which intersection function to user
   )	r¹   r(   r'   r&   r  r	   r   r   r   )Úseg1Úseg2Úswappedr5  r¼   s        r1   r)   r)   �  sº   € ð< €GÜ
ˆ4ƒy”3�t“9ÒØ˜4ˆdˆØˆÜ
ˆ4ƒy�1‚}Üˆt‹9�qŠ=Ü3°D¸$Ó?‰Mä2°4¸Ó>‰MÜ	ˆT‹�aŠœC ›I¨šNÜ-Ð;¨tÐ;°dÒ;‰äÐOÓPÐPÙØÐØ=JÖK¸ŒL˜AŸD™D Q§T¡T¨a¯d©dÖ3ÒKÐKùÒKs   Â3C	c                 óx   — 	 t        | «      }ddj                  d„ |D «       «      z  S # t        $ r d| z  cY S w xY w)zw
    >>> _segmentrepr([1, [2, 3], [], [[2, [3, 4], [0.1, 2.2]]]])
    '(1, (2, 3), (), ((2, (3, 4), (0.1, 2.2))))'
    z(%s)z, c              3   ó2   K  — | ]  }t        |«      –— Œ y ­wrP   )Ú_segmentrepr)r›   rU   s     r1   rœ   z_segmentrepr.<locals>.<genexpr>Ê  s   è ø€ Ò!>°a¤,¨q§/Ñ!>ùs   ‚z%g)ÚiterÚjoinÚ	TypeError)ÚobjÚits     r1   ro  ro  À  sG   € ð
?Ü�#‹Yˆð ˜Ÿ	™	Ñ!>¸2Ô!>Ó>Ñ>Ð>øô ò Ø�c‰zÒðús   ‚( ¨9¸9c                 ó:   — | D ]  }t        t        |«      «       Œ y)zlHelper for the doctests, displaying each segment in a list of
    segments on a single line as a tuple.
    N)Úprintro  )r»   r*  s     r1   ÚprintSegmentsrw  Í  s    € ð ò %ˆÜŒl˜7Ó#Õ$ñ%r2   Ú__main__)g{®Gázt?)gü©ñÒMbP?NN)XÚ__doc__ÚfontTools.misc.arrayToolsr   r   r   ÚfontTools.misc.transformr   rY   Úcollectionsr   r   ÚAttributeErrorÚImportErrorÚfontTools.miscÚcompiledÚCOMPILEDrD   r	   Ú__all__r   r=   ÚreturnsÚdoubleÚlocalsr+   rE   r   rÞ   rl   ÚcfuncÚinlinerS   r\   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r¥   r­   rZ   rÒ   rÓ   rÔ   r   r    rs   r†   r¬   rº   rÈ   rÑ   r$   r!   r"   r#   r%   r  r  r&   r.  r6  r'   r;  r>  rI  rd  r(   r)   ro  rw  Ú__name__ÚsysÚdoctestÚexitÚtestmodÚfailedr6   r2   r1   ú<module>rŽ     s–  ðñ÷ EÑ DÝ -Û Ý "ð&Ûð �?‰?€ð €ñ ˜.Ò*<Ó=€ò€ó@ò&ð €‡��—‘ÓØ€‡�Ø‡~�~Ø‡~�~Ø‡~�~Ø‡~�~ô	ð €‡��F—M‘M¨¯©¸6¿=¹=ÔIñ	
ó Jóó ð	
ð €‡��—‘ÓØ€‡�Ø�‰Ø�‰Ø�‰Ø�‰ô	ð €‡�Ø�m‰mØ	�‰ôòAó	óó ðAð €Ø
€ð ‡�Ø‡�Ø€‡��—‘ÓØ€‡��&—.‘. V§^¡^Ô4ñ&ó 5ó ó ó ð&ð ‡�Ø‡�Ø€‡��—‘ÓØ€‡��—‘Ôñ;ó  ó ó ó ð;ò PðF €‡��—‘ÓØ€‡�Ø�‰Ø�‰Ø�‰Ø‡~�~Ø‡~�~Ø‡n�nØ‡n�nôð €‡�Ø
�-‰-Ø�]‰]Ø‡m�mØ‡m�mØ‡}�}Ø‡}�}Ø�‰ôñóóó ð&ò@Wð" €‡��—‘ÓØ€‡�Ø�‰Ø�‰Ø�‰ôð
 €‡�Ø‡}�}Ø‡}�}Ø‡}�}ôñ
óóó ðòBòDð< €‡��—‘ÓØ€‡�Ø�‰Ø�‰Ø�‰Ø�‰ô	ð €‡�Ø‡}�}Ø‡}�}Ø‡}�}Ø‡}�}Ø‡}�}ôñ!"óóó ð!"òH#òL6òr*3òZ"2òJ,ò0ð> €‡�Ø�‰Ø�‰Ø�‰Ø�‰Ø‡n�nØ‡n�nØ‡n�nØ‡n�nô	ñ0ó	ð0ð €‡��—‘ÓØ€‡�Ø‡m�mØ�‰Ø�‰Ø�‰Ø�‰Ø�^‰^Ø	�‰Ø	�‰ô	ð €‡�Ø‡}�}˜6Ÿ=™=°·±ÈÏÉôñDóó	ó  ðDò4ò6 ðF €‡�Ø‡n�nØ‡n�nØ‡n�nØ‡n�nØ‡}�}Ø‡}�}Ø
�-‰-Ø�M‰MØ�M‰MØ‡~�~Ø‡~�~Ø‡~�~Ø‡~�~ôñ#óð#÷6 %Ó $ð "&ó òBYòB(ò2ð ‡�Ø‡�Ø€‡�Ø�‰Ø�‰Ø�‰Ø�‰Ø‡n�nØ‡n�nØ‡n�nôñóó ó ðò
(ò2ð  ‡�Ø‡�Ø€‡�Ø‡n�nØ‡n�nØ‡n�nØ‡n�nØ‡~�~Ø‡~�~Ø‡~�~ôñóó ó ðò
Nòòð4 €‡��—‘ÓØ€‡�Ø‡m�mØ�‰Ø�‰Ø�‰Ø�‰ôð €‡��&—-‘- f§m¡m¸F¿M¹MÔJñYó Kóó  ðYò -ò%ò/òKò\Cò
=ò#òL-ò	-ð 9=ó@òF;ò
$òN-Lò`
?ò%ð ˆzÒÛÛà€C‡H�Hˆ_ˆW�_‰_Ó×%Ñ%Õ&ð	 øðS. 	˜Ð$ò &ç%Ð%ð&ús   žb' â'b8â7b8