+
    ʇif                        ^ RI Ht R tR t ! R R4      t ! R R4      t ! R R	4      t ! R
 R4      t ! R R4      t ! R R4      t	R# )    )annotationsc                ~   V '       g   . # \        V ^ ,          4      ^8X  d%   \        WV4      P                  4       P                  # . pV  Fy  pVw  rVpWa8  g   Wr8  d   Rp\	        V4      hWa8X  d   VR8w  d   Rp\	        V4      hWr8X  d   VR8w  d   Rp\	        V4      hVR8X  d   K^  VP                  \        WVV4      4       K{  	  \        \        V4      ^,
          4       F  p	W9^,           ,          P                  W9,          P                  8  g/   W9^,           ,          P                  W9,          P                  8  d   Rp\	        V4      hW9^,           ,          P                  W9,          P                  8X  g   K  W9^,           ,          P                  W9,          P                  8X  g   K  Rp\	        V4      h	  V# )r   List of edit operations invalidinsertdeleteequalz$List of edit operations out of orderzDuplicated edit operation)
lenOpcodes
as_editops_editops
ValueErrorappendEditoprangesrc_posdest_pos)
opssrc_lendest_lenblocksop	edit_typer   r   msgis
   &&&       v/Users/max/.openclaw/workspace/postharvest/merge_env/lib/python3.14/site-packages/rapidfuzz/distance/_initialize_py.py_list_to_editopsr      ss   
 	
3q6{asX.99;DDDF')$	H 33CS/!)x"73CS/!I$93CS/! fY:;% * 3v;?#a%=  69#4#441u8N8NQWQZQcQc8c8CS/!a%=  FI$5$55&Q-:P:PTZT]TfTf:f-CS/! $ M    c           
        V '       d   \        V ^ ,          4      ^8X  d%   \        WV4      P                  4       P                  # . pV  EF2  pVw  rVrxp	Wq8  g   W8  d   Rp
\	        V
4      hWv8  g   W8  d   Rp
\	        V
4      hVR9   d'   Wv,
          W,
          8w  g   Wg8X  d   Rp
\	        V
4      hVR8X  d   Wg8w  g   W8X  d   Rp
\	        V
4      hVR8X  d   Wg8X  g   W8w  d   Rp
\	        V
4      hV'       df   VR,          P
                  V8X  dN   VR,          P                  V8X  d6   VR,          P                  V8X  d   WsR,          n        WR,          n        EK  VP                  \        WVWxV	4      4       EK5  	  V^ ,          P                  ^ 8w  g   V^ ,          P                  ^ 8w  d   Rp
\	        V
4      hVR,          P                  V8w  g   VR,          P                  V8w  d   Rp
\	        V
4      h\        \        V4      ^,
          4       Fl  pW;^,           ,          P                  W;,          P                  8w  g1   W;^,           ,          P                  W;,          P                  8w  g   Ka  Rp
\	        V
4      h	  V# )	r   r   r   r   z4List of edit operations does not start at position 0z7List of edit operations does not end at the string endsz)List of edit operations is not continuous>   r   replace)r	   Editops
as_opcodes_opcodesr   tagsrc_enddest_endr   Opcode	src_start
dest_startr   )r   r   r   r   r   r   r(   r%   r)   r&   r   r   s   &&&         r   _list_to_opcodesr*   2   s!   
 #c!f+"sX.99;DDDF>@;	g8 33CS/!("73CS/!,,'2EI^2^bkbv3CS/! i&:j>T3CS/! i&:j>T3CS/! 2JNNi'F2J,>,>),KPVWYPZPcPcgqPq!(2J"*2JfY7QR9 > aya6!9#7#71#<DobzW$r
(;(;x(GGo3v;?#a%=""fi&7&776a%=;S;SW]W`WiWi;i=CS/! $
 Mr   c                  >    ] tR t^htRtR tR tR tR tR t	R t
RtR	# )
MatchingBlockz)
Triple describing matching subsequences
c                	*    Wn         W n        W0n        R # Nabsize)selfr0   r1   r2   s   &&&&r   __init__MatchingBlock.__init__m   s    	r   c                	    ^#     r3   s   &r   __len__MatchingBlock.__len__r       r   c                	    \        V4      ^8w  d   R# \        V^ ,          V P                  8H  ;'       d5    V^,          V P                  8H  ;'       d    V^,          V P                  8H  4      #   \
         d     R# i ; ir8   F)r	   boolr0   r1   r2   	TypeErrorr3   others   &&r   __eq__MatchingBlock.__eq__u   sl    	5zQaDFF*[[uQx466/A[[eAhRVR[R[F[\\ 		!   A/ !A/ A/ A/ /A>=A>c                	    VR9   d   V P                   # VR9   d   V P                  # VR9   d   V P                  # Rp\        V4      h)r   z MatchingBlock index out of range   r               r    )r0   r1   r2   
IndexErrorr3   r   r   s   && r   __getitem__MatchingBlock.__getitem__~   sB    <66M<66M<990or   c              #  	F   "   \        ^4       F  pW,          x  K  	  R# 5ir8   Nr   r3   r   s   & r   __iter__MatchingBlock.__iter__        qA'M    !c                	V    R V P                    RV P                   RV P                   R2# )zMatchingBlock(a=z, b=z, size=)r/   r:   s   &r   __repr__MatchingBlock.__repr__   s)    !$&&dffXWTYYKqIIr   r/   N__name__
__module____qualname____firstlineno____doc__r4   r;   rD   rQ   rW   r]   __static_attributes__r9   r   r   r,   r,   h   s&    
	Jr   r,   c                  >    ] tR t^tRtR tR tR tR tR t	R t
RtR	# )
r   a  
Tuple like object describing an edit operation.
It is in the form (tag, src_pos, dest_pos)

The tags are strings, with these meanings:

+-----------+---------------------------------------------------+
| tag       | explanation                                       |
+===========+===================================================+
| 'replace' | src[src_pos] should be replaced by dest[dest_pos] |
+-----------+---------------------------------------------------+
| 'delete'  | src[src_pos] should be deleted                    |
+-----------+---------------------------------------------------+
| 'insert'  | dest[dest_pos] should be inserted at src[src_pos] |
+-----------+---------------------------------------------------+
c                	*    Wn         W n        W0n        R # r.   r$   r   r   )r3   r$   r   r   s   &&&&r   r4   Editop.__init__   s     r   c                	    ^# r7   r9   r:   s   &r   r;   Editop.__len__   r=   r   c                	    \        V4      ^8w  d   R# \        V^ ,          V P                  8H  ;'       d5    V^,          V P                  8H  ;'       d    V^,          V P                  8H  4      #   \
         d     R# i ; ir?   )r	   r@   r$   r   r   rA   rB   s   &&r   rD   Editop.__eq__   sm    	5zQaDHH,ggqT\\1IggeTUhZ^ZgZgNghh 		rF   c                	    VR9   d   V P                   # VR9   d   V P                  # VR9   d   V P                  # Rp\        V4      h)r   zEditop index out of rangerH   rJ   rM   )r$   r   r   rO   rP   s   && r   rQ   Editop.__getitem__   sC    <88O<<<<== )or   c              #  	F   "   \        ^4       F  pW,          x  K  	  R# 5irT   rU   rV   s   & r   rW   Editop.__iter__   rY   rZ   c                	X    R V P                   : RV P                   RV P                   R2# )zEditop(tag=z
, src_pos=z, dest_pos=r\   rh   r:   s   &r   r]   Editop.__repr__   s*    TXXL
4<<.DMM?Z[\\r   )r   r   r$   Nr_   r9   r   r   r   r      s&    "!
	]r   r   c                      ] tR t^tRtRR lt]R 4       tR tR t	R t
R tR	 tR
 tR t]R 4       t]P"                  R 4       t]R 4       t]P"                  R 4       tR tR tR tR tR tR tRtR# )r!   z@
List like object of Editops describing how to turn s1 into s2.
Nc                	@    W n         W0n        \        WV4      V n        R # r.   )_src_len	_dest_lenr   r   )r3   editopsr   r   s   &&&&r   r4   Editops.__init__         !(8Dr   c                "    VP                  4       # )z
Create Editops from Opcodes

Parameters
----------
opcodes : Opcodes
    opcodes to convert to editops

Returns
-------
editops : Editops
    Opcodes converted to Editops
)r   )clsopcodess   &&r   from_opcodesEditops.from_opcodes        !!##r   c           
        \         P                  \         4      pV P                  Vn        V P                  Vn        . p^ p^ p^ pV\	        V P
                  4      8  Ed   W0P
                  V,          P                  8  g"   W@P
                  V,          P                  8  d   VP                  \        RVV P
                  V,          P                  VV P
                  V,          P                  4      4       V P
                  V,          P                  pV P
                  V,          P                  pTpTpV P
                  V,          P                  pV\	        V P
                  4      8  d   V P
                  V,          P                  V8X  d   W0P
                  V,          P                  8X  dh   W@P
                  V,          P                  8X  dG   VR8X  d   V^,          pV^,          pM!VR8X  d   V^,          pMVR8X  d
   V^,          pV^,          pK  VP                  \        WW7V4      4       EK  W0P                  8  g   W@P                  8  d1   VP                  \        RW0P                  W@P                  4      4       W!n        V# )zX
Convert to Opcodes

Returns
-------
opcodes : Opcodes
    Editops converted to Opcodes
r   r   r   r   )r
   __new__rv   rw   r	   r   r   r   r   r'   r$   r   r   r#   )	r3   xr   r   r   r   	src_begin
dest_beginr$   s	   &        r   r"   Editops.as_opcodes   s    OOG$]]
nn#dmm$$q)111Xa@P@Y@Y5Ya(00 a(11 --*22==+44I!J--"&&CC&&MM!$((C/}}Q/777a 0 9 99)#qLGMHH_MHH_qLGQMM&hOP\\!X%=MM&'<<==YZ
r   c                .   . p^ p^ pV  F  pW$P                   8  g   W4P                  8  di   \        VP                   V,
          VP                  V,
          4      pV^ 8  d   VP                  \	        W#V4      4       VP                   pVP                  pVP
                  R8X  d   V^,          pV^,          pK  VP
                  R8X  d   V^,          pK  VP
                  R8X  g   K  V^,          pK  	  W P                  8  g   W0P                  8  dQ   \        V P                  V,
          V P                  V,
          4      pV^ 8  d   VP                  \	        W#V4      4       VP                  \	        V P                  V P                  ^ 4      4       V# )z|
Convert to matching blocks

Returns
-------
matching blocks : list[MatchingBlock]
    Editops converted to matching blocks
r   r   r   )r   r   minr   r,   r$   r   r   )r3   r   r   r   r   lengths   &     r   as_matching_blocksEditops.as_matching_blocks   s1    B#x++'=RZZ'12;;3IJA:MM-6"JK**;;vv"1A8#18#A   \\!X%=/1IJFzmGvFGmDLL$--CDr   c                V    V P                    Uu. uF  p\        V4      NK  	  up# u upi )zZ
Convert Editops to a list of tuples.

This is the equivalent of ``[x for x in editops]``
)r   tupler3   r   s   & r   as_listEditops.as_listD  s$     %)MM2Mbb	M222   &c                    \         P                  \         4      pV P                  Vn        V P                  Vn        V P                  R,          Vn        V# )z
performs copy of Editops
NNN)r!   r   rv   rw   r   r3   r   s   & r   copyEditops.copyL  =     OOG$]]
nn]]2&
r   c                :   . pV  FQ  pVP                   pVR8X  d   RpM	VR8X  d   RpVP                  \        W2P                  VP                  4      4       KS  	  \
        P                  \
        4      pV P                  Vn        V P                  Vn
        Wn        V# )a>  
Invert Editops, so it describes how to transform the destination string to
the source string.

Returns
-------
editops : Editops
    inverted Editops

Examples
--------
>>> from rapidfuzz.distance import Levenshtein
>>> Levenshtein.editops('spam', 'park')
[Editop(tag=delete, src_pos=0, dest_pos=0),
 Editop(tag=replace, src_pos=3, dest_pos=2),
 Editop(tag=insert, src_pos=4, dest_pos=3)]

>>> Levenshtein.editops('spam', 'park').inverse()
[Editop(tag=insert, src_pos=0, dest_pos=0),
 Editop(tag=replace, src_pos=2, dest_pos=3),
 Editop(tag=delete, src_pos=3, dest_pos=4)]
r   r   )r$   r   r   r   r   r!   r   r   rv   r   rw   r   r3   r   r   r$   r   s   &    r   inverseEditops.inverseV  s    . B&&ChMM&kk2::>?  OOG$]]
ll
r   c                z   \         P                  \         4      pV P                  Vn        V P                  Vn        \	        V4      \	        V 4      8  d   Rp\        V4      hR.\	        V 4      \	        V4      ,
          ,          Vn        ^ p^ p^ pV F  pV\	        V 4      8w  d`   WpP                  V,          8w  dI   V P                  V,          W&&   W&,          ;P                  V,          un        V^,          pV^,          pKo  V\	        V 4      8X  d   Rp\        V4      hVP                  R8X  d   V^,          pMVP                  R8X  d
   V^,          pV^,          pK  	  V\	        V 4      8w  dI   V P                  V,          W&&   W&,          ;P                  V,          un        V^,          pV^,          pKX  V# )z
remove a subsequence

Parameters
----------
subsequence : Editops
    subsequence to remove (has to be a subset of editops)

Returns
-------
sequence : Editops
    a copy of the editops without the subsequence
z subsequence is not a subsequenceNr   r   )	r!   r   rv   rw   r	   r   r   r   r$   )r3   subsequenceresultr   offsetop_pos
result_possops   &&      r   remove_subsequenceEditops.remove_subsequence}  sk    )-->>{c$i'4CS/!&CIK0@$@A 
CCI%#v1F*F%)]]6%:""**f4*a
! T"8 o%ww("!H$!aKF# ( D	!!%v!6F&&&0&!OJaKFr   c                   Rp^ pV P                    F  pWEP                  8  d   W1V,          ,          pV^,          pK*  VP                  R8X  d%   W2VP                  ,          ,          pV^,          pKb  VP                  R8X  d   W2VP                  ,          ,          pK  VP                  R8X  g   K  V^,          pK  	  V\	        V4      8  d   W1V,          ,          pV^,          pK*  V# )a  
apply editops to source_string

Parameters
----------
source_string : str | bytes
    string to apply editops to
destination_string : str | bytes
    string to use for replacements / insertions into source_string

Returns
-------
mod_string : str
    modified source_string

 r   r   r   )r   r   r$   r   r	   )r3   source_stringdestination_stringres_strr   r   s   &&&   r   applyEditops.apply  s    " --BJJ&111vv"bkk::18#bkk::8#1   M**W--GqLGr   c                	    V P                   # r.   rv   r:   s   &r   r   Editops.src_len      }}r   c                	    Wn         R # r.   r   r3   values   &&r   r   r         r   c                	    V P                   # r.   rw   r:   s   &r   r   Editops.dest_len      ~~r   c                	    Wn         R # r.   r   r   s   &&r   r   r         r   c                	    \        V\        4      '       g   R # V P                  VP                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # F)
isinstancer!   r   r   r   rB   s   &&r   rD   Editops.__eq__  U    %))}}.tt4<<5==3PttUYUbUbfkftftUttr   c                	,    \        V P                  4      # r.   )r	   r   r:   s   &r   r;   Editops.__len__      4==!!r   c                	     V P                   V R # r.   r   )r3   keys   &&r   __delitem__Editops.__delitem__  s    MM#r   c                	x   \        V\        4      '       d   V P                  V,          # VP                  \	        V P                  4      4      w  r#pV^ 8  d   Rp\        V4      h\        P                  \        4      pV P                  Vn        V P                  Vn	        V P                  W#V1,          Vn        V# )r   z6step sizes below 0 lead to an invalid order of editops)
r   intr   indicesr	   r   r!   r   rv   rw   )r3   r   startstopstepr   r   s   &&     r   rQ   Editops.__getitem__  s    c3==%%KKDMM(:;T!8JCS/!OOG$]]
nn]]5d?3
r   c              #  	:   "   V P                    R j  xL
  R #  L5ir.   r   r:   s   &r   rW   Editops.__iter__
       ==     c                	    R RP                  R V  4       4      ,           RV P                   RV P                   R2,           # )z	Editops([, c              3  8   "   T F  p\        V4      x  K  	  R # 5ir.   repr.0r   s   & r   	<genexpr>#Editops.__repr__.<locals>.<genexpr>       #<tDHHt   ], src_len=, dest_len=r\   joinr   r   r:   s   &r   r]   Editops.__repr__  @    $))#<t#<<<T\\NZefjfsfsettu?vv	
r   )rw   r   rv   Nr   r   )r`   ra   rb   rc   rd   r4   classmethodr~   r"   r   r   r   r   r   r   propertyr   setterr   rD   r;   r   rQ   rW   r]   re   r9   r   r   r!   r!      s    E $ $ 7r"H3%N7r'R   ^^    __ u"!
r   r!   c                  >    ] tR tRtRtR tR tR tR tR t	R t
R	tR
# )r'   i  a  
Tuple like object describing an edit operation.
It is in the form (tag, src_start, src_end, dest_start, dest_end)

The tags are strings, with these meanings:

+-----------+-----------------------------------------------------+
| tag       | explanation                                         |
+===========+=====================================================+
| 'replace' | src[src_start:src_end] should be                    |
|           | replaced by dest[dest_start:dest_end]               |
+-----------+-----------------------------------------------------+
| 'delete'  | src[src_start:src_end] should be deleted.           |
|           | Note that dest_start==dest_end in this case.        |
+-----------+-----------------------------------------------------+
| 'insert'  | dest[dest_start:dest_end] should be inserted        |
|           | at src[src_start:src_start].                        |
|           | Note that src_start==src_end in this case.          |
+-----------+-----------------------------------------------------+
| 'equal'   | src[src_start:src_end] == dest[dest_start:dest_end] |
+-----------+-----------------------------------------------------+

Note
----
Opcode is compatible with the tuples returned by difflib's SequenceMatcher to make them
interoperable
c                	B    Wn         W n        W0n        W@n        WPn        R # r.   r$   r(   r%   r)   r&   )r3   r$   r(   r%   r)   r&   s   &&&&&&r   r4   Opcode.__init__0  s    "$ r   c                	    ^#    r9   r:   s   &r   r;   Opcode.__len__7  r=   r   c                	z    \        V4      ^8w  d   R# \        V^ ,          V P                  8H  ;'       dq    V^,          V P                  8H  ;'       dS    V^,          V P                  8H  ;'       d5    V^,          V P
                  8H  ;'       d    V^,          V P                  8H  4      #   \         d     R# i ; ir   F)r	   r@   r$   r(   r%   r)   r&   rA   rB   s   &&r   rD   Opcode.__eq__:  s    	5zQaDHH$ . .!H.. .!H,. . !H/. . !H-   		-   B+ !B+ B+ B+ 2B+ B+ +B:9B:c                	    VR9   d   V P                   # VR9   d   V P                  # VR9   d   V P                  # VR9   d   V P                  # VR9   d   V P                  # Rp\        V4      hr   zOpcode index out of range>   r   >   rK   >   rN   rI   >   r8   rL   >      r    )r$   r(   r%   r)   r&   rO   rP   s   && r   rQ   Opcode.__getitem__I  se    <88O<>>!<<<<??"<== )or   c              #  	F   "   \        ^4       F  pW,          x  K  	  R# 5ir   NrU   rV   s   & r   rW   Opcode.__iter__X  rY   rZ   c                	    R V P                   : RV P                   RV P                   RV P                   RV P                   R2# )zOpcode(tag=, src_start=
, src_end=, dest_start=, dest_end=r\   r   r:   s   &r   r]   Opcode.__repr__\  sI    $((\$..1ADLL> Z//*+dmm_AG	
r   )r&   r)   r%   r(   r$   Nr_   r9   r   r   r'   r'     s%    8!
r   r'   c                      ] tR tRtRtRR lt]R 4       tR tR t	R t
R	 tR
 tR t]R 4       t]P                   R 4       t]R 4       t]P                   R 4       tR tR tR tR tR tRtR# )r
   ic  z
List like object of Opcodes describing how to turn s1 into s2.
The first Opcode has src_start == dest_start == 0, and remaining tuples
have src_start == the src_end from the tuple preceding it,
and likewise for dest_start == the previous dest_end.
Nc                	@    W n         W0n        \        WV4      V n        R # r.   )rv   rw   r*   r#   )r3   r}   r   r   s   &&&&r   r4   Opcodes.__init__k  rz   r   c                "    VP                  4       # )z
Create Opcodes from Editops

Parameters
----------
editops : Editops
    editops to convert to opcodes

Returns
-------
opcodes : Opcodes
    Editops converted to Opcodes
)r"   )r|   rx   s   &&r   from_editopsOpcodes.from_editopsu  r   r   c           
     |   \         P                  \         4      pV P                  Vn        V P                  Vn        . pV  EFq  pVP                  R8X  dn   \        VP                  VP                  ,
          4       FA  pVP                  \        RVP                  V,           VP                  V,           4      4       KC  	  K  VP                  R8X  dg   \        VP                  VP                  ,
          4       F:  pVP                  \        RVP                  VP                  V,           4      4       K<  	  K  VP                  R8X  g   EK  \        VP                  VP                  ,
          4       F:  pVP                  \        RVP                  V,           VP                  4      4       K<  	  EKt  	  W!n        V# )z`
Convert Opcodes to Editops

Returns
-------
editops : Editops
    Opcodes converted to Editops
r   r   r   )r!   r   rv   rw   r$   r   r%   r(   r   r   r)   r&   r   )r3   r   r   r   js   &    r   r   Opcodes.as_editops  s(    OOG$]]
nnBvv"rzzBLL89AMM&BLL14DbmmVWFW"XY :8#r{{R]]:;AMM&2<<QRAR"ST <8#rzzBLL89AMM&2<<!3CR]]"ST :  
r   c                   . pV  F  pVP                   R8X  g   K  \        VP                  VP                  ,
          VP                  VP
                  ,
          4      pV^ 8  g   Ka  VP                  \        VP                  VP
                  V4      4       K  	  VP                  \        V P                  V P                  ^ 4      4       V# )z|
Convert to matching blocks

Returns
-------
matching blocks : list[MatchingBlock]
    Opcodes converted to matching blocks
r   )
r$   r   r%   r(   r&   r)   r   r,   r   r   )r3   r   r   r   s   &   r   r   Opcodes.as_matching_blocks  s     Bvv RZZ",,6bmm8STA:MM-bmmV"TU	  	mDLL$--CDr   c                V    V P                    Uu. uF  p\        V4      NK  	  up# u upi )z
Convert Opcodes to a list of tuples, which is compatible
with the opcodes of difflibs SequenceMatcher.

This is the equivalent of ``[x for x in opcodes]``
)r#   r   r   s   & r   r   Opcodes.as_list  s$     %)MM2Mbb	M222r   c                    \         P                  \         4      pV P                  Vn        V P                  Vn        V P                  R,          Vn        V# )z
performs copy of Opcodes
r   )r
   r   rv   rw   r#   r   s   & r   r   Opcodes.copy  r   r   c           
     f   . pV  Fg  pVP                   pVR8X  d   RpM	VR8X  d   RpVP                  \        W2P                  VP                  VP
                  VP                  4      4       Ki  	  \        P                  \        4      pV P                  Vn
        V P                  Vn        Wn        V# )al  
Invert Opcodes, so it describes how to transform the destination string to
the source string.

Returns
-------
opcodes : Opcodes
    inverted Opcodes

Examples
--------
>>> from rapidfuzz.distance import Levenshtein
>>> Levenshtein.opcodes('spam', 'park')
[Opcode(tag=delete, src_start=0, src_end=1, dest_start=0, dest_end=0),
 Opcode(tag=equal, src_start=1, src_end=3, dest_start=0, dest_end=2),
 Opcode(tag=replace, src_start=3, src_end=4, dest_start=2, dest_end=3),
 Opcode(tag=insert, src_start=4, src_end=4, dest_start=3, dest_end=4)]

>>> Levenshtein.opcodes('spam', 'park').inverse()
[Opcode(tag=insert, src_start=0, src_end=0, dest_start=0, dest_end=1),
 Opcode(tag=equal, src_start=0, src_end=2, dest_start=1, dest_end=3),
 Opcode(tag=replace, src_start=2, src_end=3, dest_start=3, dest_end=4),
 Opcode(tag=delete, src_start=3, src_end=4, dest_start=4, dest_end=4)]
r   r   )r$   r   r'   r)   r&   r(   r%   r
   r   r   rv   r   rw   r#   r   s   &    r   r   Opcodes.inverse  s    2 B&&ChMM&mmR[[",,PRPZPZ[\  OOG$]]
ll
r   c                    RpV P                    Fg  pVP                  R8X  d"   W1VP                  VP                   ,          pK5  VP                  R9   g   KH  W2VP                  VP
                   ,          pKi  	  V# )a  
apply opcodes to source_string

Parameters
----------
source_string : str | bytes
    string to apply opcodes to
destination_string : str | bytes
    string to use for replacements / insertions into source_string

Returns
-------
mod_string : str
    modified source_string

r   r   >   r   r   )r#   r$   r(   r%   r)   r&   )r3   r   r   r   r   s   &&&  r   r   Opcodes.apply  se    " --Bvv 

CC00bmmbkkJJ	   r   c                	    V P                   # r.   r   r:   s   &r   r   Opcodes.src_len  r   r   c                	    Wn         R # r.   r   r   s   &&r   r   r    r   r   c                	    V P                   # r.   r   r:   s   &r   r   Opcodes.dest_len  r   r   c                	    Wn         R # r.   r   r   s   &&r   r   r    r   r   c                	    \        V\        4      '       g   R # V P                  VP                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # r   )r   r
   r   r   r#   rB   s   &&r   rD   Opcodes.__eq__  r   r   c                	,    \        V P                  4      # r.   )r	   r#   r:   s   &r   r;   Opcodes.__len__!  r   r   c                	n    \        V\        4      '       d   V P                  V,          # R p\        V4      h)zExpected index)r   r   r#   rA   )r3   r   r   s   && r   rQ   Opcodes.__getitem__$  s-    c3==%%nr   c              #  	:   "   V P                    R j  xL
  R #  L5ir.   )r#   r:   s   &r   rW   Opcodes.__iter__+  r   r   c                	    R RP                  R V  4       4      ,           RV P                   RV P                   R2,           # )z	Opcodes([r   c              3  8   "   T F  p\        V4      x  K  	  R # 5ir.   r   r   s   & r   r   #Opcodes.__repr__.<locals>.<genexpr>0  r   r   r   r   r\   r   r:   s   &r   r]   Opcodes.__repr__.  r   r   )rw   r#   rv   r   )r`   ra   rb   rc   rd   r4   r   r  r   r   r   r   r   r   r   r   r   r   rD   r;   rQ   rW   r]   re   r9   r   r   r
   r
   c  s    E $ $ 6&3'R6   ^^    __ u"!
r   r
   c                  >    ] tR tRtRtR tR tR tR tR t	R t
R	tR
# )ScoreAlignmenti4  z
Tuple like object describing the position of the compared strings in
src and dest.

It indicates that the score has been calculated between
src[src_start:src_end] and dest[dest_start:dest_end]
c                	B    Wn         W n        W0n        W@n        WPn        R # r.   scorer(   r%   r)   r&   )r3   r+  r(   r%   r)   r&   s   &&&&&&r   r4   ScoreAlignment.__init__=  s     
"$ r   c                	    ^# r   r9   r:   s   &r   r;   ScoreAlignment.__len__K  r=   r   c                	z    \        V4      ^8w  d   R# \        V^ ,          V P                  8H  ;'       dq    V^,          V P                  8H  ;'       dS    V^,          V P                  8H  ;'       d5    V^,          V P
                  8H  ;'       d    V^,          V P                  8H  4      #   \         d     R# i ; ir   )r	   r@   r+  r(   r%   r)   r&   rA   rB   s   &&r   rD   ScoreAlignment.__eq__N  s    	5zQaDJJ& . .!H.. .!H,. . !H/. . !H-   		r   c                	    VR9   d   V P                   # VR9   d   V P                  # VR9   d   V P                  # VR9   d   V P                  # VR9   d   V P                  # Rp\        V4      hr   )r+  r(   r%   r)   r&   rO   rP   s   && r   rQ   ScoreAlignment.__getitem__]  sf    <::<>>!<<<<??"<== )or   c              #  	F   "   \        ^4       F  pW,          x  K  	  R# 5ir   rU   rV   s   & r   rW   ScoreAlignment.__iter__l  rY   rZ   c                	    R V P                    RV P                   RV P                   RV P                   RV P                   R2# )zScoreAlignment(score=r   r   r   r   r\   r*  r:   s   &r   r]   ScoreAlignment.__repr__p  sJ    #DJJ<|DNN;K L||nM$//1B+dmm_\]_	
r   )r&   r)   r+  r%   r(   Nr_   r9   r   r   r(  r(  4  s%    !
r   r(  N)

__future__r   r   r*   r,   r   r!   r'   r
   r(  r9   r   r   <module>r8     sc    #)X3l&J &JR3] 3]lI
 I
X
M
 M
`N
 N
b@
 @
r   