
]c           @  s  d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l m Z m Z d  d l Z d  d l	 Z	 d  d l
 Z d  d l Z d  d l Z d  d l m Z m Z d  d l m Z d  d l m Z d  d l m Z d  d l m Z m Z m Z m Z m Z d  d l Z d  d l Z e e j   d	  a  e j! j" d
  Z# d Z$ e j% j& d d e' d e( d e( Z) d   Z* d e j+ j, f d     YZ- d e! f d     YZ. e j! j" d  Z/ d e. f d     YZ0 e1 e2 f Z3 d e! f d     YZ4 e j5 j6 j7   Z8 d e0 f d     YZ9 d e. f d     YZ: d e. f d     YZ; d  e0 f d!     YZ< d" e. f d#     YZ= d$ e. f d%     YZ> d& e. f d'     YZ? d( e. f d)     YZ@ d* e. f d+     YZA d, e0 f d-     YZB d. e! f d/     YZC eC   ZD d0 ZE d1   ZF d2   ZG d S(3   i(   t   print_functionN(   t   loadst   dumps(   t	   Transformt   ATLTransform(   t   Fixed(   t   displayable(   t   py_eval_bytecode(   t   Analysist	   NOT_CONSTt   LOCAL_CONSTt   GLOBAL_CONSTt   ccachei@B t   use_expressions   <screen language>t   profile_screent	   developert   appendt   flushc         C  s/   t  j d |   } t  j |  t | t d  S(   s:   
    Wraps the node in a python AST, and compiles it.
    t   bodyt   eval(   t   astt
   Expressiont   fix_missing_locationst   compilet   filename(   t   nodet   expr(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   compile_exprE   s    t	   SLContextc           B  s,   e  Z d  Z d d  Z d   Z d   Z RS(   ss   
    A context object that can be passed to the execute methods, and can also
    be placed in renpy.ui.stack.
    c         C  s   | d  k	 r# |  j j | j  d  Si  |  _ i  |  _ g  |  _ i  |  _ d  |  _ i  |  _ i  |  _	 i  |  _
 t j t  |  _ d  |  _ d  |  _ t |  _ t |  _ t |  _ t   |  _ d  |  _ t |  _ d  |  _ d  |  _ t |  _ i  |  _ i  |  _ d  S(   N(   t   Nonet   __dict__t   updatet   scopet   globalst   childrent   keywordst   style_prefixt	   new_cachet	   old_cachet
   miss_cachet   collectionst   defaultdictt   intt	   use_indext
   uses_scopet   widgetst   Falset   debugt
   predictingt   updatingt   sett	   predictedt   showift   failt   parentt
   transcludet   unlikelyt   new_use_cachet   old_use_cache(   t   selfR6   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   __init__U   s2    																			c         C  s   |  j  j |  d  S(   N(   R"   R   (   R;   t   dt   key(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   add   s    c         C  s   t  d   d  S(   Ns   Spurious ui.close().(   t	   Exception(   R;   R=   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   close   s    N(   t   __name__t
   __module__t   __doc__R   R<   R?   RA   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR   O   s   R	t   SLNodec           B  s   e  Z d  Z e Z e Z e Z d   Z d   Z	 d   Z
 d   Z d   Z d   Z d   Z d   Z d	   Z d
   Z d   Z d   Z d   Z RS(   s3   
    The base class for screen language nodes.
    c         C  s    t  d 7a  t  |  _  | |  _ d  S(   Ni   (   t   serialt   location(   R;   t   loc(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<      s    
	c         C  s7   t  |   } | j |  } |  j | _ |  j | _ | S(   s   
        Instantiates a new instance of this class, copying the global
        attributes of this class onto the new instance.
        (   t   typet   __new__RF   RG   (   R;   R7   t   clst   rv(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   instantiate   s
    c         C  s   t  d t |   j   d S(   sv   
        Makes a copy of this node.

        `transclude`
            The constness of transclude statements.
        s   copy not implemented by N(   R@   RI   RB   (   R;   R7   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   copy   s    c         C  s,   | r
 d  S|  j \ } } | | | d  f g S(   N(   R   RG   (   R;   t   namet   lastR   t   line(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   report_traceback   s    c         C  s   d S(   sQ   
        Performs static analysis on Python code used in this statement.
        N(    (   R;   t   analysis(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   analyze   s    c         C  s   d S(   s$  
        This should be called before the execute code is called, and again
        after init-level code (like the code in a .rpym module or an init
        python block) is called.

        `analysis`
            A pyanalysis.Analysis object containing the analysis of this screen.
        N(    (   R;   RS   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   prepare   s    c         C  s   t  d t |   j   d S(   sE   
        Execute this node, updating context as appropriate.
        s   execute not implemented by N(   R@   RI   RB   (   R;   t   context(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   execute   s    c         C  s   d S(   sN   
        Execute this node, updating context.keywords as appropriate.
        N(    (   R;   RV   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR#     s    c         C  s   d S(   sr   
        Flags the displayables that are created by this node and its children
        as copy-on-change.
        N(    (   R;   t   cache(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   copy_on_change	  s    c         C  s   |  j  \ } } t j j |  } t j | |  p6 d } | j d  } t j d | | | j	    |  j
 r} t j d  n  d S(   sN   
        Writes information about the line we're on to the debug log.
        t    s   utf-8s
     %s:%d %ss       potentially constantN(   RG   t   renpyt   exportst   unelide_filenamet	   linecachet   getlinet   decodet   profile_logt   writet   rstript   constant(   R;   R   t   linenot   full_filenameRQ   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt
   debug_line  s    	c         C  s   d S(   se   
        Calls callback with the name of each screen this node and its
        children use.
        N(    (   R;   t   callback(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   used_screens!  s    c         C  s   t  S(   s[   
        Returns true if this node is a transclude or has a transclude as a child.
        (   R.   (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   has_transclude)  s    c         C  s   t  S(   sV   
        Returns true if this node is Python or has a python node as a child.
        (   R.   (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt
   has_python0  s    (   RB   RC   RD   R   Rd   R.   t   has_keywordt   last_keywordR<   RM   RN   RR   RT   RU   RW   R#   RY   Rg   Ri   Rj   Rk   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRE      s"   	
		
									t   NotGivent   SLBlockc           B  s   e  Z d  Z d Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d   Z d	   Z d
   Z d   Z d   Z RS(   sk   
    Represents a screen language block that can contain keyword arguments
    and child displayables.
    c         C  s&   t  j |  |  g  |  _ g  |  _ d  S(   N(   RE   R<   t   keywordR"   (   R;   RH   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<   E  s    	c         C  sJ   t  j |  |  } |  j | _ g  |  j D] } | j |  ^ q( | _ | S(   N(   RE   RM   Rp   R"   RN   (   R;   R7   RL   t   i(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRM   N  s    (c         C  s   |  j  |  S(   N(   RM   (   R;   R7   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN   U  s    c         C  s%   x |  j  D] } | j |  q
 Wd  S(   N(   R"   RT   (   R;   RS   Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRT   X  s    c   
      C  s  x6 |  j  D]+ } | j |  t |  j | j  |  _ q
 Wi  } g  } g  } x |  j D] \ } } t j |  } | j |  }	 |	 t k r t	 t
 |   | | <n& | j t j d |   | j |  t |  j |	  |  _ qU W| r | |  _ n	 d  |  _ | rBt j d | d |  } t j | | d  t
 |  |  _ n	 d  |  _ t |  j  |  _ g  |  _ |  j d  k	 rt |  _ |  j j   |  j j }	 t |  j |	  |  _ n  xL |  j  D]A } | j r|  j j |  t |  _ n  | j rt |  _ PqqWd  S(   Nt   st   keyst   valuesi    (   R"   RU   t   minRd   Rp   R   t   ast_evalt   is_constantR   R   R   R   R   t   Strt   keyword_valuesR   t   Dictt   copy_locationt   keyword_exprst   boolRl   t   keyword_childrent   atl_transformt   Truet   mark_constantRm   (
   R;   RS   Rq   Ry   t   keyword_keysR|   t   kR   R   t   const(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRU   ]  sH    							c         C  sB   x; |  j  D]0 } y | j |  Wq
 | j s:   q: q
 Xq
 Wd  S(   N(   R"   RW   R0   (   R;   RV   Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW     s    	c         C  s  |  j  } | d  k	 r( | j j |  n  |  j } | d  k	 rb | j j t | | j | j   n  x |  j D] } | j |  ql W|  j	 d  k	 r t
 |  j	 d | j } | | j d <n  | j j d t  } | t k r | j j d t  } n  | t k	 r| | _ n  d  S(   NRV   t   atR$   t   style_group(   Ry   R   R#   R   R|   R   R!   R    R~   R   R   t   popRn   R$   (   R;   RV   Ry   R|   Rq   t	   transformR$   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR#     s     		%c         C  s%   x |  j  D] } | j |  q
 Wd  S(   N(   R"   RY   (   R;   RX   Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRY     s    c         C  s%   x |  j  D] } | j |  q
 Wd  S(   N(   R"   Ri   (   R;   Rh   Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRi     s    c         C  s(   x! |  j  D] } | j   r
 t Sq
 Wt S(   N(   R"   Rj   R   R.   (   R;   Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRj     s    c         C  s   t  d   |  j D  S(   Nc         s  s   |  ] } | j    Vq d  S(   N(   Rk   (   t   .0Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pys	   <genexpr>  s    (   t   anyR"   (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRk     s    c         C  s   t  |  j  } x{ | r | j d  } t |  t k rL | j | j  q t | t  r x+ | j D] \ } } | j	 |  qe Wq t
 Sq Wt S(   ss   
        Returns true if this block has a child that is not an SLIf statement,
        or false otherwise.
        i    (   t   listR"   R   RI   Ro   t   extendt
   isinstancet   SLIft   entriesR   R   R.   (   R;   t   worklistt   nt   _t   block(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   has_noncondition_child  s    	N(   RB   RC   RD   R   R   R<   RM   RN   RT   RU   RW   R#   RY   Ri   Rj   Rk   R   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRo   <  s   						9						t   SLCachec           B  s   e  Z d  Z d   Z RS(   s=   
    The type of cache associated with an SLDisplayable.
    c         C  s   d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ g  |  _	 i  |  _
 t |  _ d  |  _ d  |  _ d  |  _ d  S(   N(   R   R   t
   positionalR#   R"   R   t   raw_transformt   imagemapRd   t   constant_uses_scopet   constant_widgetsR.   RY   t
   old_showifR7   R$   (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<     s    													(   RB   RC   RD   R<   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR     s   t   SLDisplayablec           B  s   e  Z d  Z e Z e Z g  Z e e e e e e e i  e e d 
 Z d   Z	 d   Z
 d   Z d   Z d   Z d   Z d   Z d	   Z RS(
   sc   
    A screen language AST node that corresponds to a displayable being
    added to the tree.
    c         C  sw   t  j |  |  | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ |	 |  _	 |
 |  _
 | |  _ g  |  _ d S(   s  
        `displayable`
            A function that, when called with the positional and keyword
            arguments, causes the displayable to be displayed.

        `scope`
            If true, the scope is supplied as an argument to the displayable.

        `child_or_fixed`
            If true and the number of children of this displayable is not one,
            the children are added to a Fixed, and the Fixed is added to the
            displayable.

        `style`
            The base name of the main style.

        `pass_context`
            If given, the context is passed in as the first positonal argument
            of the displayable.

        `imagemap`
            True if this is an imagemap, and should be handled as one.

        `hotspot`
            True if this is a hotspot that depends on the imagemap it was
            first displayed with.

        `replaces`
            True if the object this displayable replaces should be
            passed to it.

        `default_keywords`
            The default keyword arguments to supply to the displayable.

        `variable`
            A variable that the main displayable is assigned to.
        N(   Ro   R<   R   R    t   child_or_fixedt   stylet   pass_contextR   t   hotspott   replacest   default_keywordst   variableR   (   R;   RH   R   R    R   R   t
   text_styleR   R   R   R   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<   0  s    '										c         C  s   |  j  |  } |  j | _ |  j | _ |  j | _ |  j | _ |  j | _ |  j | _ |  j | _ |  j | _ |  j	 | _	 |  j
 | _
 |  j | _ | S(   N(   RM   R   R    R   R   R   R   R   R   R   R   R   (   R;   R7   RL   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN   h  s    c         C  s  |  j  rZ t } x/ |  j D]$ \ } } t | | j |   } q W| j d | t k  n  |  j r t | j    |  j  |  _ n  t j	 |  |  |  j  r | j
   n  |  j r t | j  |  _ n  |  j d  k	 r|  j } x, |  j D]! } t |  j | j |   } q WxG |  j D]< \ } } t |  j | j |   } | d k rt } qqW| t k ru| j |  j  q| t k r| j |  j  qn  d  S(   NR   t   id(   R   R   Rp   Ru   t   is_constant_exprt   push_controlR   Rd   Ro   RT   t   pop_controlR    R   t   local_constantR   R   R   R	   R
   R   t   mark_not_constant(   R;   RS   R   t   _kR   Rq   R   t   v(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRT   y  s0    					c         C  s  t  j |  |  g  } g  } t } t } x |  j D] } t j |  } | j |  } | t k r | j t	 t
 |    | j t j d d   t } n  | j t  | j |  t } t |  j |  |  _ q2 W| r | |  _ n	 d  |  _ | r;t j d | d t j    }	 t j |	 | d  t
 |	  |  _ n	 d  |  _ t |  _ x/ |  j D]$ \ }
 } |
 d k rWt |  _ qWqWW|  j d  k	 rt |  _ n  d  S(   NR   i    t   eltst   ctxR   (   Ro   RU   R.   R   R   Rv   Rw   R   R   R   R   R   t   NumR   R   Ru   Rd   t   positional_valuesR   t   Tuplet   LoadR{   t   positional_exprsRl   Rp   R	   R   (   R;   RS   t   exprsRt   t	   has_exprst
   has_valuest   aR   R   t   tR   t   _expr(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRU     s<    				c         C  s   d  S(   N(    (   R;   RV   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR#     s    c   &      C  s:  | j  } t j j } | j j |  j d   pB | j j |  j d   } t	 | t
  s` t
   } n  | | j |  j <| j } | r |  j   n  | j r| j | j k rx| j D]r \ } } | r t | j  } | j |  n	 | j } | r| j | t  r#d  | _ Pq#q | j | t  q W| j }	 |	 t k	 rv| j d  k	 rc|  j |	 | |  }	 n  | j j |	  n  | j d  k	 r| j j | j  n  | rt j d  n  d  Sn  t  |  }
 t } d  } t } y|  j! } |  j" } | rL| rLt# | | j$ | j  } g  t% | |  D]$ \ } } | t& k r=| n | ^ q} n6 | r[| } n' | r|t# | | j$ | j  } n g  } |  j' j(   } |
 _) |  j rg  |
 _ n  t* j) |  |
  | j+ d d   } | j+ d d   } | j+ d d   } | j+ d d   } | j+ d d   p|  j, } | r3| | 7} n  | rI| j |  n  d | k r| r|
 j d  k rw| | d <q|
 j d | | d <n  | r| | j- k r| j | j- |  n  | j. } | r| j/ p| } n d  } t } | r|  j0 | | | |  n  | d  k	 o@| | j1 k o@| | j) k o@| j | j k } |  j2 d  k	 ra| rat } n  |  j3 rt j j4 d	 } | j5 | k	 rt } n  | | _5 n  | r(t } | }	 | } | r|
 j6 r| | j7 | <n  |  j r(| j8 r(| r| j |
 j t  r"t } q"q%| j |
 j t  q(n  | rc|  j5 rct } | j5 j9   t j j4 j | j5  n  | s:| | _1 | j(   | _) |  j r|
 j | d
 <n  |  j: r|
 j; r| | d <n  |  j< r|
 | d <n  |  j. | |   }	 |	 j/ p|	 } |  j= | _> | r|
 j6 r| | j7 | <n  |  j5 } t | _ d  | _ n  | r| rVt j d  q|  j rot j d  qt j d  n  Wn | j? s  n  t } n X|  j2 d  k	 r| | j |  j2 <n  g  |
 _ d  |
 _ t j j@ } | j |
  zH xA |  j D]6 } y | jA |
  Wq| j? s%  n  t } qXqWWd  d  |
 _) | j+   | rxt j j4 j+   | _5 | j5 jB jC   n  X| rtD |  x |
 j D] } tD |  qWt | _E d  S|
 j | j k r	| ru| ru|  j r|
 j | d
 <n  |  j: r
| j; r
| | d <n  |  j< r |
 | d <n  |  j. | |   }	 |	 j/ p>|	 } |  j= | _> | rc| | j7 | <n  t | _ t } n  | r| jF   n  |  jG rtH |
 j  d k rtI   }  x |
 j D] } |  jJ |  qW| jJ |   q	x! |
 j D] } | jJ |  qWn  | j? r	| d  k	 r	t jK jL jM }! |	 |! tN |  <|	 | k	 r	x6 t% | jO |	 jO  D] \ }" }# |# |! tN |"  <q[	Wq	n  |	 | _. |
 j | _ | j | _ | d  k	 r|	 t k	 r| r$
| | jP k r$
t	 | jQ t jK jQ jR  r
| jQ jS |	 k	 r
| jQ jT |	 d t q
n  | jQ }	 n | | _P t	 | tR  rX
| d |	  }	 |	 jU   np t	 | tV  r
x^ | D]= }$ t	 |$ tR  r
|$ d |	  }	 n |$ |	  }	 |	 jU   qn
Wn | |	  }	 |	 jU   t	 |	 tR  r| jQ }% | j; s
d  }% n  |	 jW |%  |	 jX |%  n  |	 | _Q n d  | _Q d  | _P |
 jE rBt | _E n |  j r|	 | _ |  j r| j8 ri  } x4 |  jY D]) } | |
 j k rv|
 j | | | <qvqvW|
 j j | | f  n  |
 j | _ | j d  k	 r| j j |
 j  qn  |	 t k	 r6| j d  k	 r#|  j |	 | |  }	 n  | j j |	  n  d  S(   Ns       reused constant displayableR   R   t	   argumentst
   propertiest   style_suffixR   R   iR    R   RV   s       reused displayables        created constant displayables       created displayablei   t	   duplicatet   child(Z   R/   R[   t   uit   screenR&   t   getRF   R   R'   R   R   R%   RY   Rg   Rd   R$   R   t   dictR    R   t   _scopeR.   R   t   NO_DISPLAYABLER4   t   wrap_in_showifR"   R   R,   R   Ra   Rb   R   R   R   R   R!   t   zipR   R   RN   R#   Ro   R   R   t   widget_propertiesR   t   _maint   report_argumentsR   R   R   t   imagemap_stackR   R8   R-   t   _uses_scopet   reuseR   R1   R   RG   t	   _locationR0   t   stackRW   RX   t   finisht   predict_displayableR5   t   _clearR   t   lenR   R?   t   displayt   focust   replaced_byR   t   _composite_partsR   R   R   R   t	   set_childt   _uniquet   list_or_tuplet
   take_statet   take_execution_stateR   (&   R;   RV   R/   R   RX   RY   Rq   t   local_scopeR    R=   R   R5   t   mainR   R   R   Rt   R   t   bR   R#   t	   widget_idR   R   R   R   t   old_dt   old_maint   reusedt	   can_reuset   imcR   t   fR   t   old_partt   new_partR   t   old_transform(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW     s   	0						=			<										
				

						"		
								c         C  sD   t  j j j | j | j  } | j |  | j s@ | | _ n  | S(   s4   
        Wraps `d` in a ShowIf displayable.
        (   R[   t   sl2t   sldisplayablest   ShowIfR4   R   R?   R0   (   R;   R=   RV   RX   RL   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR   P  s
    	c   	      C  sx  | r g  } |  j  p% t g t |  } x t t |   D]y } | | t k	 ra | j d  q; | j d  k r | j d  q; | j | | | k r | j d  q; | j d  q; Wt j d d j	 |   n  |  j
 p i  } | ri  } | j d  k r8x | D], } | | k r'd | | <qn  d | | <qWn x | D]{ } t |  } | | k rmd | | <q?n  | | j k rd | | <q?n  | | | j | k rd | | <q?d | | <q?Wx* | j D] } | | k rd | | <qqWt j d	 |  n  | d  k	 rtd
 | k r&t j d  qt| j d  k rEt j d  qt| j | k rdt j d  qtt j d  n  d  S(   NR   t   newt   equals	   not-equals       args: %st    s   new-onlys   old-onlys       kwargs: %rR   s       at: consts       at: news       at: equals       at: not-equal(   R   R   R   t   rangeR   R   R   Ra   Rb   t   joinRy   R#   t   strR   (	   R;   RX   R   R#   R   t   reportRt   Rq   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR   ]  sX    


c         C  sU   | j  |  j d   } t | t  r0 t | _ n  x |  j D] } | j |  q: Wd  S(   N(   R   RF   R   R   R   R   RY   R"   (   R;   RX   t   cRq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRY     s
    (   RB   RC   RD   R.   R   R   R   R   R<   RN   RT   RU   R#   RW   R   R   RY   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR   $  s   '8		)	7		 t		BR   c           B  sq   e  Z d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z RS(   sS   
    A screen language AST node that corresponds to an If/Elif/Else statement.
    c         C  s   t  j |  |  g  |  _ d S(   s>   
        An AST node that represents an if statement.
        N(   RE   R<   R   (   R;   RH   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<     s    c         C  sG   |  j  |  } g  |  j D]! \ } } | | j |  f ^ q | _ | S(   N(   RM   R   RN   (   R;   R7   RL   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN     s    4c         C  s   t  } x> |  j D]3 \ } } | d  k	 r t | | j |   } q q W| j |  x$ |  j D] \ } } | j |  q^ W| j   d  S(   N(   R   R   R   Ru   R   R   RT   R   (   R;   RS   R   t   condt   _blockt   _condR   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRT     s    c         C  s   g  |  _  x |  j D] \ } } | d  k	 rg t j |  } t |  j | j |   |  _ t |  } n  | j	 |  t |  j | j  |  _ |  j  j
 | | f  |  j p | j |  _ |  j p | j |  _ q Wd  S(   N(   t   prepared_entriesR   R   R   Rv   Ru   Rd   Rw   R   RU   R   Rl   Rm   (   R;   RS   R   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRU     s    	c         C  s   | j  r |  j |  d  Sx` |  j D]U \ } } | d  k sT t | | j | j  r$ x | j D] } | j |  q^ Wd  Sq$ Wd  S(   N(	   R0   t   execute_predictingR   R   R   R!   R    R"   RW   (   R;   RV   R   R   Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW     s    	$c   	      C  sB  t  } |  j | j k } | s4 | j j |  j  n  x|  j D] \ } } y( | d  k pn t | | j | j  } Wn t	 } n X| r | r t	 } x | j
 D]! } y | j |  Wq q Xq Wq> | s> t |  } g  | _
 t  | _ x, | j
 D]! } y | j |  Wq q Xq Wx | j
 D] } t |  q#Wq> q> Wd  S(   N(   R   RF   R3   R?   R   R   R   R!   R    R.   R"   RW   R   R8   R   (	   R;   RV   t   firstR3   R   R   t
   cond_valueRq   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR     s6    (
		c         C  sS   xL |  j  D]A \ } } | d  k s: t | | j | j  r
 | j |  d  Sq
 Wd  S(   N(   R   R   R   R!   R    R#   (   R;   RV   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR#     s    $c         C  s+   x$ |  j  D] \ } } | j |  q
 Wd  S(   N(   R   RY   (   R;   RX   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRY   $  s    c         C  s+   x$ |  j  D] \ } } | j |  q
 Wd  S(   N(   R   Ri   (   R;   Rh   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRi   (  s    c         C  s.   x' |  j  D] \ } } | j   r
 t Sq
 Wt S(   N(   R   Rj   R   R.   (   R;   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRj   ,  s    c         C  s   t  d   |  j D  S(   Nc         s  s   |  ] } | d  j    Vq d S(   i   N(   Rk   (   R   Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pys	   <genexpr>4  s    (   R   R   (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRk   3  s    (   RB   RC   RD   R<   RN   RT   RU   RW   R   R#   RY   Ri   Rj   Rk   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR     s   	
					.				t   SLShowIfc           B  s_   e  Z d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z RS(
   s@   
    The AST node that corresponds to the showif statement.
    c         C  s   t  j |  |  g  |  _ d S(   s>   
        An AST node that represents an if statement.
        N(   RE   R<   R   (   R;   RH   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<   <  s    c         C  sG   |  j  |  } g  |  j D]! \ } } | | j |  f ^ q | _ | S(   N(   RM   R   RN   (   R;   R7   RL   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN   F  s    4c         C  s+   x$ |  j  D] \ } } | j |  q
 Wd  S(   N(   R   RT   (   R;   RS   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRT   M  s    c         C  s   g  |  _  x |  j D] \ } } | d  k	 rg t j |  } t |  j | j |   |  _ t |  } n  | j	 |  t |  j | j  |  _ |  j  j
 | | f  q Wt |  _ d  S(   N(   R   R   R   R   Rv   Ru   Rd   Rw   R   RU   R   R   Rm   (   R;   RS   R   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRU   R  s    	c         C  s   | j  t k	 } x |  j D] \ } } t |  } | sC t | _  n? | d  k sg t | | j | j  ry t | _  t } n	 t | _  x | j	 D] } | j
 |  q W| j r t | _ q q Wd  S(   N(   R4   R.   R   R   R   R   R!   R    R   R"   RW   R5   (   R;   RV   t
   first_trueR   R   R   Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW   f  s    $				c         C  s+   x$ |  j  D] \ } } | j |  q
 Wd  S(   N(   R   RY   (   R;   RX   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRY     s    c         C  s+   x$ |  j  D] \ } } | j |  q
 Wd  S(   N(   R   Ri   (   R;   Rh   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRi     s    c         C  s.   x' |  j  D] \ } } | j   r
 t Sq
 Wt S(   N(   R   Rj   R   R.   (   R;   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRj     s    c         C  s   t  d   |  j D  S(   Nc         s  s   |  ] } | d  j    Vq d S(   i   N(   Rk   (   R   Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pys	   <genexpr>  s    (   R   R   (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRk     s    (   RB   RC   RD   R<   RN   RT   RU   RW   RY   Ri   Rj   Rk   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR   7  s   	
							t   SLForc           B  sS   e  Z d  Z d Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z RS(	   s   
    The AST node that corresponds to a for statement. This only supports
    simple for loops that assign a single variable.
    c         C  s/   t  j |  |  | |  _ | |  _ | |  _ d  S(   N(   Ro   R<   R   t
   expressiont   index_expression(   R;   RH   R   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<     s    		c         C  s+   |  j  |  } |  j | _ |  j | _ | S(   N(   RM   R   R   (   R;   R7   RL   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN     s    c         C  ss   | j  |  j  t k r8 | j t  | j |  j  n | j t  | j |  j  t	 j
 |  |  | j   d  S(   N(   R   R   R   R   R   R   R   R.   R   Ro   RT   R   (   R;   RS   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRT     s    c         C  s   t  j |  j  } | j |  } | t k rN t t |   |  _ d  |  _	 n d  |  _ t |  |  _	 t
 |  j |  |  _ t j |  |  t |  _ d  S(   N(   R   Rv   R   Rw   R   R   R   t   expression_valueR   t   expression_exprRu   Rd   Ro   RU   R   Rm   (   R;   RS   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRU     s    	c         C  s4  |  j  } |  j } y4 | d  k	 r< t | | j | j  } n	 |  j } Wn | j s[   n  d g } n Xi  } | j j	 |  j
 |  p i  } t | t  s i  } n  | j j	 |  j
 |  p i  } t | t  s i  } n  t |  } x"t |  D]\ }	 }
 |
 | j | <|  j d  k	 r9t |  j | j | j  }	 n  | j	 |	 d   pNi  | _ t | j t  sri  | _ n  | j	 |	 d   pi  | _ t | j t  si  | _ n  i  | |	 <| _ x; |  j D]0 } y | j |  Wq| j s  qqXqW| j r Pq q W| | j |  j
 <| j r0t | _ n  d  S(   Ni    (   R   R  R   R   R!   R    R   R0   R&   R   RF   R   R   R'   R   t	   enumerateR   R%   R"   RW   R8   R5   R   (   R;   RV   R   R   t   valuet	   newcachest	   oldcachest
   misscachesR   t   indexR   Rq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW     sP    								c         C  s   d  S(   N(    (   R;   RV   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR#     s    c         C  sd   | j  |  j d   } t | t  s( d  Sx5 | j   D]' } x |  j D] } | j |  qE Wq5 Wd  S(   N(   R   RF   R   R   R   Rt   R"   RY   (   R;   RX   R   t   child_cacheRq   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRY     s    N(   RB   RC   RD   R   R   R<   RN   RT   RU   RW   R#   RY   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR     s   					B	t   SLPythonc           B  s>   e  Z d    Z d   Z d   Z d   Z d   Z d   Z RS(   c         C  s   t  j |  |  | |  _ d  S(   N(   RE   R<   t   code(   R;   RH   R
  (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<     s    c         C  s   |  j  |  } |  j | _ | S(   N(   RM   R
  (   R;   R7   RL   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN   !  s    c         C  s   | j  |  j j  d  S(   N(   t   pythonR
  t   source(   R;   RS   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRT   (  s    c         B  s   |  j  j | j | j Ud  S(   N(   R
  t   bytecodeR!   R    (   R;   RV   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW   +  s    c         C  s   t  |  _ t |  _ d  S(   N(   R	   Rd   R   Rm   (   R;   RS   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRU   .  s    	c         C  s   t  S(   N(   R   (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRk   2  s    (   RB   RC   R<   RN   RT   RW   RU   Rk   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR	    s   					t   SLPassc           B  s   e  Z d    Z d   Z RS(   c         C  s   d  S(   N(    (   R;   RV   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW   8  s    c         C  s   |  j  |  } | S(   N(   RM   (   R;   R7   RL   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN   ;  s    (   RB   RC   RW   RN   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR  6  s   	t	   SLDefaultc           B  s>   e  Z d    Z d   Z d   Z d   Z d   Z d   Z RS(   c         C  s&   t  j |  |  | |  _ | |  _ d  S(   N(   RE   R<   R   R   (   R;   RH   R   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<   C  s    	c         C  s+   |  j  |  } |  j | _ |  j | _ | S(   N(   RM   R   R   (   R;   R7   RL   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN   I  s    c         C  s   | j  |  j  d  S(   N(   R   R   (   R;   RS   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRT   Q  s    c         C  s1   t  t j |  j   |  _ t |  _ t |  _ d  S(   N(	   R   R   Rv   R   R   R	   Rd   R   Rm   (   R;   RS   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRU   T  s    	c         C  sB   | j  } |  j } | | k r" d  St |  j | j |  | | <d  S(   N(   R    R   R   R   R!   (   R;   RV   R    R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW   Y  s
    		c         C  s   t  S(   N(   R   (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRk   b  s    (   RB   RC   R<   RN   RT   RU   RW   Rk   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR  A  s   						t   SLUsec           B  s\   e  Z d Z d Z d    Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d   Z RS(	   c         C  sA   t  j |  |  | |  _ d  |  _ | |  _ | |  _ | |  _ d  S(   N(   RE   R<   t   targetR   R   t   argsR   R   (   R;   RH   R  R  t   id_exprR   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<   k  s    				c         C  sp   |  j  |  } |  j | _ |  j | _ |  j | _ |  j d  k	 rZ |  j j |  | _ n	 d  | _ d  | _ | S(   N(   RM   R  R  R   R   R   RN   R   (   R;   R7   RL   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN     s    		c         C  s>   t  |  _ |  j r t |  _ n  |  j r: |  j j |  n  d  S(   N(   R   Rm   R   R	   Rd   R   RT   (   R;   RS   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRT     s
    			c         C  s<  d  |  _ |  j rF |  j j |  |  j j t k r= t } qL t } n t } t |  j	 t
 j j  r t |  _ t } d  |  _ n t
 j j j |  j	  } | d  k r t |  _ t
 j j r t d j |  j	    q d  Sn  | j d  k r t |  _ d  S| r| j j |  _ n | j j |  _ t |  j |  j j  |  _ d  S(   Ns!   A screen named {} does not exist.(   R   R   R   RU   Rd   R   R   R.   R   R  R[   t   PyExprR	   R   R   t   get_screen_variantt   configR   R@   t   formatt	   const_astt   not_const_astRu   (   R;   RS   R   R  (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRU     s0    							c         C  s   | j  |  j } | d | j  |  j <| j j d d  |  j | f } |  j rl |  j j | j  \ } } n g  } i  } t j j j	 |  j
 d | d | j | | d  S(   Ni   t   _nameR   (    (   R+   RF   R    R   R  t   evaluateR[   R   R   t
   use_screenR  (   R;   RV   RF   RO   R  t   kwargs(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   execute_use_screen  s    		c         C  sj  t  |  j t j j  r t |  j | j | j  } t j j	 j
 |  } | d  k rl t d j |    n  | j j } d } n |  j } |  j } | d  k r |  j |  d  St |  } i  | _ | j |  j <| j j |  j d   p i  | _ g  | _ |  j r| t |  j | j | j  f } | j j | d   pW| j j |  j d   pWi  | _ | | j k rxt | _ n  | j | j | <n! | j j |  j d   pi  | _ t  | j t  si  | _ n  t  | j t  si  | _ n  y7 |  j r|  j j | j  \ } }	 n g  } i  }	 Wn" | j s4  n  g  } i  }	 n X| j  d  k	 r| j  j! | |	 d | j }
 | j j d d   p| j j d d   pi  } | j" |
  nF | rt d j |  j t# |     n  | j j$   } | j" |	  | | d <| | j d <| | _ t% j& |  | _' |  j( | _) z | j* |  Wd  | d =X| j+ rft | _+ n  d  S(   Ns!   A screen named {} does not exist.t   _use_expressiont   ignore_errorsR    s8   Screen {} does not take positional arguments. ({} given)R   (,   R   R  R[   R   R  R   R!   R    R   R   R  R   R@   R  R  R  R   R%   RF   R'   R   R,   R   R:   R&   R   R1   R9   R   R  R  R0   t
   parameterst   applyR   R   RN   t   weakreft   refR6   R   R7   RW   R5   (   R;   RV   t   target_nameR  R   t	   id_prefixR   t   use_idR  R  t	   new_scopeR    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW     sn    			!		!6!	
	
0$
		c         C  sK   | j  |  j d   } | d  k r% d  S|  j d  k	 rG |  j j |  n  d  S(   N(   R   RF   R   R   RY   (   R;   RX   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRY   :  s
    c         C  s   | |  j   d  S(   N(   R  (   R;   Rh   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRi   C  s    N(   RB   RC   R   R   R   R<   RN   RT   RU   R  RW   RY   Ri   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR  f  s   			
	+		a		t   SLTranscludec           B  s5   e  Z d    Z d   Z d   Z d   Z d   Z RS(   c         C  s   t  j |  |  d  S(   N(   RE   R<   (   R;   RH   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<   I  s    c         C  s   |  j  |  } | | _ | S(   N(   RM   Rd   (   R;   R7   RL   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN   L  s    	c         C  s[  | j  s d  S| j } | d  k	 r. |   } n  t |  } i  | _ | j |  j <| j j |  j d   pl i  | _ | j j |  j d   p i  | _ t	 | j t
  s i  | _ n  t	 | j t
  s i  | _ n  | j  | j d <| j | _ | j | _ z7 t j j j |  | j  j |  | j  j |  Wd  t j j j   X| j rWt | _ n  d  S(   NR7   (   R7   R6   R   R   R%   RF   R&   R   R'   R   R   R"   R4   R[   R   R   R   R#   RW   R   R5   R   (   R;   RV   R6   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW   Q  s.    		!!	c         C  sI   | j  |  j d   } | d  k s- d | k r1 d  St j | d |  d  S(   NR7   (   R   RF   R   Ro   RY   (   R;   RX   R   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRY   s  s    c         C  s   t  S(   N(   R   (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRj   |  s    (   RB   RC   R<   RN   RW   RY   Rj   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR)  G  s
   			"		t   SLScreenc           B  s   e  Z d  Z d Z d Z d Z d Z d Z d Z	 d   Z
 d   Z d   Z d   Z d   Z d	   Z d
   Z d   Z d   Z d   Z RS(   sD   
    This represents a screen defined in the screen language 2.
    i    s	   'screens'R   c         C  sn   t  j |  |  d  |  _ d |  _ d |  _ d  |  _ d |  _ d |  _ d |  _	 d  |  _
 d  |  _ t |  _ d  S(   NR.   t   0R   R   (   Ro   R<   R   RO   t   modalt   zordert   tagt   variantt   predictt	   sensitiveR!  RS   R.   t   prepared(   R;   RH   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<     s    									c         C  s   |  j  |  } |  j | _ |  j | _ |  j | _ |  j | _ |  j | _ |  j | _ |  j | _ |  j | _ t	 | _
 d  | _ d  | _ | S(   N(   RM   RO   R,  R-  R.  R/  R0  R!  R1  R.   R2  R   RS   R   (   R;   R7   RL   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRN     s    			c         C  s   t  j j j |  j |  d |  j d |  j d |  j d t  j j	 |  j
  d t  j j	 |  j  d |  j d |  j d t  j j	 |  j  d	 |  j 	d
 S(   s#   
        Defines a screen.
        R,  R-  R.  R/  R0  R!  RG   t   layerR1  N(   R[   R   R   t   define_screenRO   R,  R-  R.  R  t   py_evalR/  R0  R!  RG   R3  R1  (   R;   RG   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   define  s    					c         C  s   t  j |  |  d  S(   N(   Ro   RT   (   R;   RS   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRT     s    c         C  s@  |  j  r d  S|  j |  j f } | t j k rR t j | |  _  t j | |  _ d  S|  |  _  |  j   r |  j t	  |  _ |  j  |  j g } n |  j  |  _ |  j  g } xj | D]b } t
 d   } | _ | j r | j | j  n  | j |  x | j   s| j |  q Wq W|  j  t j | <|  j t j | <t t _ d  S(   N(   R  RO   R/  t   scachet   const_analyzedt   not_const_analyzedR  Rj   RN   R	   R   R   RS   R!  RT   t   at_fixed_pointR   t   updated(   R;   R>   t   targetsR   RS   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   analyze_screen  s.    			c         C  s   t  |  _ d  S(   N(   R.   R2  (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   unprepare_screen  s    c         C  sl  |  j  r d  S|  j   |  j d 7_ |  j j |  j j  |  j |  j k	 rg |  j j |  j j  n  t |  _  t j	 j
 j |  j  j rht j d |  j  g  |  j j j D] } | t j j k r | ^ q } | j   t j d d j |   t |  j j j  } | j   t j d d j |   t |  j j j  } | j   t j d d j |   n  d  S(   Ni   s   CONST ANALYSIS %ss       global_const: %sR   s       local_const: %ss       not_const: %s(   R2  R=  t   versionR  RU   RS   R  R   R[   R   R   t   get_profileRO   R   Ra   Rb   t   global_constantt
   pyanalysist	   constantst   sortR   R   R   t   not_constant(   R;   Rq   t   new_constantst   local_constantst   not_constants(    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   prepare_screen
  s&    	
	4


c         C  s!   |  j  |  t j |  |  d  S(   N(   R#   Ro   RW   (   R;   RV   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRW   +  s    c         C  s-   | r
 d  S| d k r g  St j |  | |  S(   Nt   __call__(   R   Ro   RR   (   R;   RO   RP   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRR   /  s
    c   
        s  | d } | j  d t  }  j r | j  d d  } | j  d i   } t j j  j | | d t j j j } | j	 |  n   j
 s  j   n  t j j j   } | j d t j j k r t } n  t   } | | _ t j j d | _ | | _ t j j j | _ | j t j j j k | _ | d      f d	   } | | j  | _ | | j  | _ i  j d
 6| _ | j  | _! i  | _"  j# j$ |  x! | j% D] }	 t j& j' |	  qW| j | j   <| j" | _  d  S(   NR   t   _debugt   _argst   _kwargsR   i    t   storeR  c           s^   |  j    d   } t | t  s= | j  d d    j k rZ i  j d 6} | |    <n  | S(   NR?  (   R   R   R   R   R?  (   R=   RL   (   RO   R;   (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt	   get_cacheV  s
    +R?  (    ((   R   R.   R!  R[   R   t   apply_argumentsR   R0  R0   R   R2  RI  R   t   current_screent   screen_nameR  t   profile_screensR   R   R    R  t   store_dictsR!   R/   t   phaset   UPDATER1   RX   R&   R'   R?  R%   t	   use_cacheR:   R9   R  RW   R"   R   t   implicit_add(
   R;   R  R  R    R/   Rt   RQ  RV   RO  Rq   (    (   RO   R;   sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRJ  8  s<    
	*					
		N(   RB   RC   RD   R?  R   R  R  RS   R3  R1  R<   RN   R6  RT   R=  R>  RI  RW   RR   RJ  (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR*    s"   	#				%		!			t   ScreenCachec           B  s   e  Z d    Z RS(   c         C  s(   d |  _  i  |  _ i  |  _ t |  _ d  S(   Ni   (   R?  R8  R9  R.   R;  (   R;   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyR<   q  s    			(   RB   RC   R<   (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyRY  o  s   s   cache/screens.rpybc          C  s   t  j j j r d  Sy t  j j t  }  |  j t j	   j
  } | t  j j j j   k r_ d  St t j |  j     } |  j   | j t j k r t  j j j   t j j | j  t j j | j  n  Wn n Xd  S(   N(   R[   t   gameR  R   t   loadert   loadt   CACHE_FILENAMEt   readt   hashlibt   md5t   digest_sizet   scriptt   digestR   t   zlibt
   decompressRA   R?  R7  t   update_bytecodeR8  R   R9  (   R   Rc  Rr   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt
   load_cache  s    
c          C  s   t  j s d  St j r d  Syl t j t t  d  d  }  t t j j	 t
  d  0 } | j t j j j j    | j |   Wd  QXWn n Xd  S(   Ni   i	   t   wb(   R7  R;  R[   t   macappRd  t   compressR   t   openR[  t   get_pathR]  Rb   RZ  Rb  Rc  (   t   dataR   (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt
   save_cache  s    		(H   t
   __future__R    R   R(   R^   t   cPickleR   R   Rd  R#  t   renpy.displayR[   t   renpy.pyanalysist	   renpy.sl2t   renpy.display.transformR   R   t   renpy.display.layoutR   t   renpy.display.predictR   R   t   renpy.pythonR   R   R	   R
   R   R   R_  t   timeR*   RF   t   objectt   SentinelR   R   t   logRk  R   R.   Ra   R   R   t   AddableR   RE   Rn   Ro   R   t   tupleR   R   R   t   layoutt   NullR   R   R   R   R   R	  R  R  R  R)  R*  RY  R7  R]  Rg  Rn  (    (    (    sh   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slast.pyt   <module>   sZ   ($	
_7  \%9		