+
    i-                        ^ RI Ht ^ RIHtHtHt ^ RIHtHt ^ RI	H
t
Ht ^ RIHt ^ RIHtHt ^ RIHtHtHtHt ^ RIHt ^ R	It^ R	It]P4                  ! R
4      t ! R R4      tR tR t ! R R]4      t ! R R]4      t  ! R R]4      t!R t"R t#R t$R t%R t&R t' ^ RI(H)t) ]%t*R t.R t/R t0^t1R  t2R! t3R"]4! 4       /R# lt5R%R$ lt6R	#   ]+ d     ^ RI,H-t- ]&t* L6  ]+ d    ]'t*  LBi ; ii ; i)&    )LerpGlyphSet)AbstractPenBasePenDecomposingPen)AbstractPointPenSegmentToPointPen)RecordingPenDecomposingRecordingPen)	Transform)defaultdictdeque)sqrtcopysignatan2pi)EnumNzfontTools.varLib.interpolatablec                   r    ] tR t^tRtRtRtRtRtRt	Rt
RtR	tR
tRt]^]^]^]^]	^]
^]^]^]^	]^
]^/tRtR# )InterpolatableProblemnothingmissing	open_path
path_count
node_countnode_incompatibilitycontour_orderwrong_start_pointkinkunderweight
overweight N)__name__
__module____qualname____firstlineno__NOTHINGMISSING	OPEN_PATH
PATH_COUNT
NODE_COUNTNODE_INCOMPATIBILITYCONTOUR_ORDERWRONG_START_POINTKINKUNDERWEIGHT
OVERWEIGHTseverity__static_attributes__r        چ/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/fontTools/varLib/interpolatableHelpers.pyr   r      s{    GGIJJ1#M+DKJ 	1AAaq1aQBHr2   r   c                N    \        \        V P                  4       R RR7      4      # )zGSort problems by severity, then by glyph name, then by problem message.c                 6    \        R  V ^,           4       4      ) # )c              3      "   T F:  p\         P                  VR ,          ,          VP                  R^ 4      ,           x  K<  	  R# 5i)type	toleranceN)r   r0   get).0ps   & r3   	<genexpr>2sort_problems.<locals>.<lambda>.<locals>.<genexpr>2   s:      ! +33AfI>{TUAVVV!s   AA)min)_s   &r3   <lambda>sort_problems.<locals>.<lambda>1   s    3qT r2   T)keyreverse)dictsorteditems)problemss   &r3   sort_problemsrH   ,   s+    NN 		
 r2   c                "    W) R V RV)  ,           # )zwRotate list by k items forward.  Ie. item at position 0 will be
at position k in returned list.  Negative k is allowed.Nr    )lks   &&r3   rot_listrL   <   s     RS6AcrF?r2   c                   T   a  ] tR t^Bt o RR ltR tR tR tR tR t	R t
R	 tR
tV tR# )PerContourPenNc                f    \         P                  ! W4       W n        Wn        R V n        . V n        R # N)r   __init__	_glyphset_Pen_penvalue)selfPenglyphsets   &&&r3   rQ   PerContourPen.__init__C   s(    (!		
r2   c                \    V P                  4        V P                  P                  V4       R # rP   )_newItemrT   moveTo)rV   p0s   &&r3   _moveToPerContourPen._moveToJ   s    		r2   c                <    V P                   P                  V4       R # rP   )rT   lineTo)rV   p1s   &&r3   _lineToPerContourPen._lineToN   s    		r2   c                <    V P                   P                  W4       R # rP   )rT   qCurveTo)rV   rb   p2s   &&&r3   _qCurveToOnePerContourPen._qCurveToOneQ   s    		2"r2   c                >    V P                   P                  WV4       R # rP   )rT   curveTo)rV   rb   rg   p3s   &&&&r3   _curveToOnePerContourPen._curveToOneT   s    		""%r2   c                H    V P                   P                  4        R V n         R # rP   )rT   	closePathrV   s   &r3   
_closePathPerContourPen._closePathW   s    			r2   c                H    V P                   P                  4        R V n         R # rP   )rT   endPathrq   s   &r3   _endPathPerContourPen._endPath[   s    			r2   c                j    V P                  4       ;V n        pV P                  P                  V4       R # rP   )rS   rT   rU   append)rV   pens   & r3   r[   PerContourPen._newItem_   s&    ))+%	C

#r2   )rS   rR   rT   rU   rP   )r!   r"   r#   r$   rQ   r^   rc   rh   rm   rr   rv   r[   r1   __classdictcell____classdict__s   @r3   rN   rN   B   s2     #& r2   rN   c                   &   a  ] tR t^dt o R tRtV tR# )PerContourOrComponentPenc                j    V P                  4        V P                  R,          P                  W4       R# )   N)r[   rU   addComponent)rV   	glyphNametransformations   &&&r3   r   %PerContourOrComponentPen.addComponente   s!    

2##I>r2   r    N)r!   r"   r#   r$   r   r1   r|   r}   s   @r3   r   r   d   s     ? ?r2   r   c                   L   a  ] tR t^jt o R tRR ltV 3R lR ltRR ltRtV t	R# )	SimpleRecordingPointPenc                    . V n         R # rP   rU   rq   s   &r3   rQ    SimpleRecordingPointPen.__init__k   s	    
r2   Nc                    R # rP   r    )rV   
identifierkwargss   &&,r3   	beginPath!SimpleRecordingPointPen.beginPathn       r2   c                   < V ^8  d   QhRR/# )   returnNr    )formatr~   s   "r3   __annotate__$SimpleRecordingPointPen.__annotate__q   s       r2   c                    R # rP   r    rq   s   &r3   ru   SimpleRecordingPointPen.endPathq   r   r2   c                J    V P                   P                  Yf   RMR34       R # )NFT)rU   ry   )rV   ptsegmentTypes   &&&r3   addPoint SimpleRecordingPointPen.addPointt   s    

2(;uFGr2   r   rP   )
r!   r"   r#   r$   rQ   r   ru   r   r1   r|   r}   s   @r3   r   r   j   s%      H Hr2   r   c                 `    ^ p\        W4       F  w  r4WC,
          pW%V,          ,          pK  	  V# r   )zipv0v1sx0x1ds   &&    r3   vdiff_hypot2r   x   s0    	Ab+G	U
  Hr2   c                     ^ p\        W4       FR  w  r4WC,
          pW%P                  VP                  ,          VP                  VP                  ,          ,           ,          pKT  	  V# r   )r   realimagr   s   &&    r3   vdiff_hypot2_complexr      sJ    	Ab+G	VVaff_qvv.. 
 Hr2   c                 @   a  \        V 3R  l\        V4       4       4      # )c              3   H   <"   T F  w  rSV,          V,          x  K  	  R # 5irP   r    )r:   ijGs   &  r3   r<    matching_cost.<locals>.<genexpr>   s     7#641qtAww#6   ")sum	enumerate)r   matchings   f&r3   matching_costr      s    79X#6777r2   c                     \        V 4      p\        V 4      w  r#V\        \        V4      4      8H  P	                  4       '       g   Q h\        R  V 4       4      p\        V4      \        W4      3# )c              3   8   "   T F  p\        V4      x  K  	  R # 5irP   )int)r:   es   & r3   r<   <min_cost_perfect_bipartite_matching_scipy.<locals>.<genexpr>   s     %1As   )lenlinear_sum_assignmentlistrangeallr   )r   nrowscolss   &   r3   )min_cost_perfect_bipartite_matching_scipyr      s_    AA&q)JDDqN"'')))) %%%D:}Q---r2   c                     \        V 4      pR .V,          p\        4       P                  V 4       F	  w  r4WBV&   K  	  V\        W4      3# rP   )r   Munkrescomputer   )r   r   r   rowcols   &    r3   +min_cost_perfect_bipartite_matching_munkresr      sF    AA6A:DI%%a(S	 )q'''r2   c                    \        V 4      pV^8  d   \        R4      h\        P                  ! \	        V4      4      p\        \        V4      4      p\        W4      pV F"  p\        W4      pWd8  g   K  \        V4      TrCK$  	  W43# )   z4Install Python module 'munkres' or 'scipy >= 0.17.0')r   	Exception	itertoolspermutationsr   r   nextr   )r   r   r   best	best_costr;   costs   &      r3   .min_cost_perfect_bipartite_matching_bruteforcer      s|    AA1uNOO ))%(3L\"#Da&IQ""1gt)  ?r2   )r   )r   c                    \        \        V P                  4      4      p\        WP                  4      V P                  V P
                  V P                  ^,          V P                  ^,          V P                  V,          3# )r   )	r   absarear   meanXmeanYstddevXstddevYcorrelation)statssizes   & r3   contour_vector_from_statsr      s`     EJJ D$$D  r2   c                   a	 \        V 4      p\        \        V4      4      pV  UUu. uF  qA Uu. uF  p\        WE4      NK  	  upNK  	  uppo	\	        S	4      w  pp\        V	3R  l\        V4       4       4      pWgV3# u upi u uppi )c              3   D   <"   T F  pSV,          V,          x  K  	  R # 5irP   r    )r:   r   costss   & r3   r<   'matching_for_vectors.<locals>.<genexpr>   s     6XaXs    )r   r   r   r   #min_cost_perfect_bipartite_matchingr   )
m0m1r   identity_matchingr   r   r   r   identity_costr   s
   &&       @r3   matching_for_vectorsr      s~    BAU1X;=>2RR0Rrl2"R02>E 	,E26U1X66MM11 1>s   BA=B=Bc                 R    ^ p\        V 4       F  w  r#V^,          V,          pK  	  V# r   )reversed)pointsbitsr   bs   &   r3   points_characteristic_bitsr      s*    D&!	Q "Kr2   c                 4   . pV '       g   V# V  UUu. uF  w  r#\        V!  NK  	  p pp\        V 4      p\        ^8X  g   Q hV P                  V R\        ^,
           4       \        V 4      \        8  d"   V P                  V R\        ^,
           4       K5  \	        V4       F  pW,          pVP                  V4       W^,           ,          pWv,
          pVP                  V^,          4       W^,           ,          p	W,
          p
VP                  W,
          4       VP                  V
P                  ,          VP                  V
P                  ,          ,
          p\        \        \        V4      4      V4      pVP                  V^,          4       K  	  V# u uppi )   N)complexr   $_NUM_ITEMS_PER_POINTS_COMPLEX_VECTORextendr   ry   r   r   r   r   r   )r   vectorr   r?   r   r   r]   rb   d0rg   d1crosss   &           r3   points_complex_vectorr      sA   F(./urgrlF/FA/1444
MM&C?!CDE
f+<
<fGCaGHI1X Yb E]Wb1f E]Wbg "''!BGGbgg$55c%j)51eai + . M; 0s   Fc                    \        V 4      p\        V 4      pV'       d   V R R R1,          p \        V 4      pMTp\        V 4      p\        V4      V,          ^ 8X  g   Q h\        V4      V,          p^V,          ^,
          p\        V4       Fk  p	WTV	,
          ,          V,          WY,	          ,          p
W8X  g   K.  TP	                  \        Wi) V,          4      V'       d   V^,
          V	,
          MT	V34       Km  	  R # )Nr   )r   r   r   r   ry   rL   )r   isomorphismsrC   reference_bitsr   r   r   multmaskr   r   s   &&&        r3   add_isomorphismsr    s    /7NFA
 ")&1"6*Fv;?av;!DFa<D1X1uo%$)4&"t),7a!eai7S r2   discrete_axesc          	        aa R .\        \        \        V 4      ^,
          4      4      ,           p\        \        \        V 4      4      4      pV'       Ed   \        V4       UUu. uFe  w  rV\        ;QJ d-    V3R lVP                  4        4       F  '       d   K   RM"	  RM! V3R lVP                  4        4       4      '       g   Kc  VNKg  	  pppV'       d#   \        P                  ! R\        V4      V4       M\        P                  ! R4        ^ RI	H
p \        \        V4      4       U	u. uF  p	^ .\        V4      ,          NK  	  p
p	\        4       pV F"  oVP                  SP                  4       4       K$  	  \        V4      pV Uau. uF5  o\        ;QJ d    . V3R lV 4       F  NK  	  5M! V3R lV 4       4      NK7  	  pp\         P"                  ! \        \        V4      4      ^4       F  w  r]\%        WV,          4       UUu/ uF  w  rVS9   g   K  WbK  	  ppp\%        WV,          4       UUu/ uF  w  rVS9   g   K  WbK  	  pppVV8w  d   Kj  \'        W,          W,          4      W,          V&   K  	  V! V
RR7      pVP)                  4       w  pp\+        \        4      p
\%        VV4       F6  w  ppV
V,          P-                  V4       V
V,          P-                  V4       K8  	  R .\        V4      ,          p. p\        4       p\/        V4      pV'       dk   VP1                  4       pVP-                  V4       VP3                  V4       \        W,          4       F!  pVV9  g   K  WSV&   VP3                  V4       K#  	  Kr  \        V4      \        V4      8X  g   Q R	4       h \6        P                  R
V4       \6        P                  RV4       W43# u uppi u up	i u upi u uppi u uppi   \4         d     LXi ; i)Nc              3   D   <"   T F  w  rVS9  g   K  V^ 8H  x  K  	  R# 5ir   Nr    )r:   rK   vr  s   &  r3   r<   )find_parents_and_order.<locals>.<genexpr>3  s      Jida1M3I616is     FTzFound %s base masters: %szNo base master location found)minimum_spanning_treec              3   H   <"   T F  pSP                  V^ 4      x  K  	  R# 5ir  )r9   )r:   rK   rJ   s   & r3   r<   r  C  s     7$QQUU1a[[$r   )	overwritez.Not all masters are reachable; report an issuezParents: %sz	Order: %s)r   r   r   r   r   rF   logginginfowarningscipy.sparse.csgraphr	  setupdatekeysrE   tupler   combinationsr   r   nonzeror   addr   popleftry   ImportErrorlog)	glyphsets	locationsr  parentsorderr   rJ   basesr	  r?   graphaxesvectorsr   rK   r  i_discrete_locationj_discrete_locationtreer   r   r   r   visitedqueues   &&d   `                  r3   find_parents_and_orderr'  +  sF   ftE#i.1"4566Gs9~&'Ey "),
,sJaggiJsssJaggiJJ A, 	 

 LL4c%j%HOO;<-	B38Y3HI3HaaS3y>))3HEI5DAFFH% $<DAJKAuu7$7uu7$77GK!..uS^/DaH%(qz%:'%:TQa=>PDAD%: $ ' &)qz%:'%:TQa=>PDAD%: $ ' '*==*7:wzB I )$?DJD$$EdOSc
s#c
s# ,
 fs9~-GEeG%LEMMOAQ)A'%&
Q * u:"  @?@  	(e$>y
 J
 L''>  		s|   #4O!)O!O!O= .O'
AO= O,+O,	AO= O1O1$O= <O7O7CO= 'A
O= 6;O= 'O= =P
Pc                    V P                   pV P                  pV P                  pW$,
          R ,          ^,          W3,          ,           R ,          pW$,           R ,          V,           pW$,           R ,          V,
          pV^ 8w  d   \        Wb,
          V4      MW$8  d   \        R ,          M^ p\        4       p	V^ 8  d   ^ pV'       do   V	P                  V P                  ) V P                  ) 4      p	V	P                  V) 4      p	V	P                  ^\        V4      ,          ^\        V4      ,          4      p	V	# V	P                  \        V4      \        V4      4      p	V	P                  V4      p	V	P                  V P                  V P                  4      p	V	# )g      ?)	varianceX
covariance	varianceYr   r   r   	translater   r   rotatescaler   )
r   inversear   cdeltalambda1lambda2thetatranss
   &&        r3   transform_from_statsr7  o  s-   AAAum!AE)c1Eume#Gume#G%&!VE'+q!ae"s(EKE{ u{{l;eV$AW-q4=/@A L	 DM4=9U#U[[9Lr2   )F)7fontTools.ttLib.ttGlyphSetr   fontTools.pens.basePenr   r   r   fontTools.pens.pointPenr   r   fontTools.pens.recordingPenr	   r
   fontTools.misc.transformr   collectionsr   r   mathr   r   r   r   enumr   r   r  	getLoggerr  r   rH   rL   rN   r   r   r   r   r   r   r   r   scipy.optimizer   r   r  munkresr   r   r   r   r   r   r  r  r'  r7  r    r2   r3   <module>rC     s   3 G G G M . * * *   9: 8 G D?} ?H. H8.((
4*S'2 () $!H6A#% AH o  

	
# 8 	,  
: 	,


s*   C C.C	C*&C.)C**C.