
    Of`                         d Z dZdZdZdgZddlZddlZddZ	 e	            Z
d	 Zdd
Zedk    rd Z e             dS dS )uS
  
=====================
 Javascript Minifier
=====================

rJSmin is a javascript minifier written in python.

The minifier is based on the semantics of `jsmin.c by Douglas Crockford`_\.

:Copyright:

 Copyright 2011 - 2023
 André Malo or his licensors, as applicable

:License:

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

The module is a re-implementation aiming for speed, so it can be used at
runtime (rather than during a preprocessing step). Usually it produces the
same results as the original ``jsmin.c``. It differs in the following ways:

- there is no error detection: unterminated string, regex and comment
  literals are treated as regular javascript code and minified as such.
- Control characters inside string and regex literals are left untouched; they
  are not converted to spaces (nor to \n)
- Newline characters are not allowed inside string and regex literals, except
  for line continuations in string literals (ECMA-5).
- "return /regex/" is recognized correctly.
- More characters are allowed before regexes.
- Line terminators after regex literals are handled more sensibly
- "+ +" and "- -" sequences are not collapsed to '++' or '--'
- Newlines before ! operators are removed more sensibly
- (Unnested) template literals are supported (ECMA-6)
- Comments starting with an exclamation mark (``!``) can be kept optionally
- rJSmin does not handle streams, but only complete strings. (However, the
  module provides a "streamy" interface).

Since most parts of the logic are handled by the regex engine it's way faster
than the original python port of ``jsmin.c`` by Baruch Even. The speed factor
varies between about 6 and 55 depending on input and python version (it gets
faster the more compressed the input already is). Compared to the
speed-refactored python port by Dave St.Germain the performance gain is less
dramatic but still between 3 and 50 (for huge inputs). See the docs/BENCHMARKS
file for details.

rjsmin.c is a reimplementation of rjsmin.py in C and speeds it up even more.

Supported python versions are 2.7 and 3.6+.

.. _jsmin.c by Douglas Crockford:
   http://www.crockford.com/javascript/jsmin.c
u   André MalozApache License, Version 2.0z1.2.2jsmin    NFc                    !"#$ | s7	 ddl }t          |dd          t          k    r|j        S n# t          $ r Y nw xY w	 $ n# t
          $ r
 t          $Y nw xY wd}d}d}d}d}d	}|                    d
d          }d}d}	|	                    dd          }	d|d|d|	d}
d}d}d|d|d|d}d|d|d}d|z  }d $fd  $fd} |d          }d}dt                      z  }  d          }  d          }  d           }  d!          }d"}t          j
        d#t                      z            j        }d$ }t          j
        d%t                      z            j        }t          j
        d&t                      z            j        !d' "!"fd(}t          j        ||          t          j        ||          #d+#fd*	}|S ),aY  
    Generate JS minifier based on `jsmin.c by Douglas Crockford`_

    .. _jsmin.c by Douglas Crockford:
       http://www.crockford.com/javascript/jsmin.c

    Parameters:
      python_only (bool):
        Use only the python variant. If true, the c extension is not even
        tried to be loaded.

    Returns:
      callable: Minifier
    r   N__version__z[\000-\011\013\014\016-\040]z(?://[^\r\n]*)z"(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)z'(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/)z#(?:/\*![^*]*\*+(?:[^/*][^*]*\*+)*/)z7(?:'[^'\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^'\\\r\n]*)*')'z\047z7(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^"\\\r\n]*)*")z/(?:`[^`\\]*(?:\\(?:[^\r\n]|\r?\n|\r)[^`\\]*)*`)`z\140z(?:|)z.(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\])z[^/\\\[\r\n]z(?:/(?![\r\n/*])z*(?:(?:\\[^\r\n]|z*)*/[a-z]*)z(?:%s?[\r\n])c                 *   |                      d          }|dk    r| d|         | |dz   d         d} d }t          j        dd  ||                               dd	                              d
d                              dd                    S )z6 Fixup string of chars to fit into a regex char class -r   N   c                 
   ddg }}}t          t          |           D ]0}||x}}	|dz   |k    r|}|                    ||f           |x}}1||                    ||f           d                    d |D                       S )zf
            Notate consecutive characters as sequence

            (1-4 instead of 1234)
            Nr    c                 ~    g | ]:\  }}t          |          ||d z   k    rdpd||k    rt          |          pd;S )r   r   r   chr).0firstlasts      8/var/www/html/env/lib/python3.11/site-packages/rjsmin.py
<listcomp>zJ_make_jsmin.<locals>.fix_charclass.<locals>.sequentize.<locals>.<listcomp>   sn     ) ) ) % E


uqy (S.B.+#d))1r1 ) ) )    )mapordappendjoin)stringr   r   resultchars        r   
sequentizez6_make_jsmin.<locals>.fix_charclass.<locals>.sequentize   s     #'b4EC(( ( (<#''EDDAX%%DDMM5$-000#''EDDudm,,,77 ) ) "(	) ) ) * * *r   z([\000-\040'`])c                 L    dt          |                     d                    z  S )Nz\%03or   )r   groupms    r   <lambda>z4_make_jsmin.<locals>.fix_charclass.<locals>.<lambda>   s    hQWWQZZ0 r   \z\\[z\[]z\])find_resubreplace)r   posr   s      r   fix_charclassz"_make_jsmin.<locals>.fix_charclass   s    kk#!88!'vcAghh/?/?/?@F	* 	* 	*. w00
6""v&&e$$e$$
 
 	
r   c                     t          j        |           j        d                    fd d          D                       }d |          z  S )z! Make id_literal like char class r   c                 ^    g | ])} t          |                    t          |          *S  r   r   cmatchs     r   r   z4_make_jsmin.<locals>.id_literal_.<locals>.<listcomp>   B     
 
 
uuSVV}}
FF
 
 
r      z[^%s]r)   compiler3   r   )whatr   r3   r-   xranges     @r   id_literal_z _make_jsmin.<locals>.id_literal_   sn    D!!' 
 
 
 
"F3KK
 
 
   v....r   c                     t          j         |                     j        d                    fd d          D                       }d |          z  S )z) Make negated id_literal like char class r   c                 ^    g | ])} t          |                    t          |          *S r0   r   r1   s     r   r   z8_make_jsmin.<locals>.not_id_literal_.<locals>.<listcomp>   r4   r   r5   z[%s]r6   )keepr   r3   r-   r:   r9   s     @r   not_id_literal_z$_make_jsmin.<locals>.not_id_literal_   sx    KK--..4 
 
 
 
"F3KK
 
 
   v....r   z[a-zA-Z0-9_$]z[(,=:\[!&|?{};\r\n+*-]z%(not_id_literal)sreturnz[a-zA-Z0-9_${\[(!+-]z[a-zA-Z0-9_$}\])"\047\140+-]z[^\000-\040}\])?:|,;.&=+-]z[^\047"\140/\000-\040]a  (%(dull)s+)|(%(strings)s%(dull)s*)|(?<=[)])%(space)s*(?:%(newline)s%(space)s*)*(%(regex)s)(?=%(space)s*(?:%(newline)s%(space)s*)*\.%(space)s*(?:%(newline)s%(space)s*)*[a-z])|(?<=%(preregex1)s)%(space)s*(?:%(newline)s%(space)s*)*(%(regex)s)(%(space)s*(?:%(newline)s%(space)s*)+(?=%(post_regex_off)s))?|(?<=%(preregex2)s)%(space)s*(?:(%(newline)s)%(space)s*)*(%(regex)s)(%(space)s*(?:%(newline)s%(space)s*)+(?=%(post_regex_off)s))?|(?<=%(id_literal_close)s)%(space)s*(?:(%(newline)s)%(space)s*)+(?=%(id_literal_open)s)|(?<=%(id_literal)s)(%(space)s)+(?=%(id_literal)s)|(?<=\+)(%(space)s)+(?=\+)|(?<=-)(%(space)s)+(?=-)|%(space)s+|(?:%(newline)s%(space)s*)+c                 p   |                                  }|d         r|d         S |d         r|d         S |d         r|d         S |d         r|d         r|d         dz   S |d         S |d         r"|d         rdpd	|d         |d
         rdpd	S |d         rdS |d         s|d         s|d         rdS d	S ) Substitution callback r   r            
      r         	   
       groupsr3   rN   s     r   space_subber_simplez(_make_jsmin.<locals>.space_subber_simple   s
    !9 	!9AY 	!9AY 	!9AY 	ay (ay4''!9AY 	q	"d(b(q		q	"d(b( 
 AY 	4AY 	&* 	r
 	32r   a  (%(dull)s+)|(%(strings)s%(dull)s*)|(?<=[)])(%(space)s*(?:%(newline)s%(space)s*)*)(%(regex)s)(?=%(space)s*(?:%(newline)s%(space)s*)*\.%(space)s*(?:%(newline)s%(space)s*)*[a-z])|(?<=%(preregex1)s)(%(space)s*(?:%(newline)s%(space)s*)*)(%(regex)s)(%(space)s*(?:%(newline)s%(space)s*)+(?=%(post_regex_off)s))?|(?<=%(preregex2)s)(%(space)s*(?:(%(newline)s)%(space)s*)*)(%(regex)s)(%(space)s*(?:%(newline)s%(space)s*)+(?=%(post_regex_off)s))?|(?<=%(id_literal_close)s)(%(space)s*(?:%(newline)s%(space)s*)+)(?=%(id_literal_open)s)|(?<=%(id_literal)s)(%(space)s+)(?=%(id_literal)s)|(?<=\+)(%(space)s+)(?=\+)|(?<=-)(%(space)s+)(?=-)|(%(space)s+)|((?:%(newline)s%(space)s*)+)zK%(space_chars)s+|%(space_comment_nobang)s+|%(newline)s+|(%(bang_comment)s+)c                 :    |                                  d         pdS Nr   r   rM   r"   s    r   r$   z_make_jsmin.<locals>.<lambda>&  s    qxxzz!}* r   c                    |                                  }|d         r|d         S |d         r|d         S |d         r |d                   |d         S |d         r< |d                   |d          |d         pd          |d         rd	pdS |d
         rH |d                   |d         rd	pd|d
          |d         pd          |d         rd	pdS |d         r |d                   d	z   S |d         s|d         s|d         r$ |d         p|d         p|d                   pdS  |d         p|d                   S )r@   r   r   rB   rA   rF   rC   rE   r   rD   rI   rG   rH   rJ   rK            rL         rM   r3   rN   r=   keepers     r   space_subber_bangedz(_make_jsmin.<locals>.space_subber_banged*  s    !9 	:!9AY 	:!9AY 	:VVAY'''q		  AY 	:VVAY'''q		VVAY_"---q	"d(b(	  AY 	:VVAY'''q	"d(b(q		VVBZ-2...r
#t)r)  BZ 	:4r
++d22BZ 	:6": 	: 	:4r
 FfRj FF2JGGN3N4r
 8fRj999r   Fc                     t          |           \  }}  |rnd| z                                            } |r*|                     d          } |dk    rt          |           } | S )aI  
        Minify javascript based on `jsmin.c by Douglas Crockford`_\.

        Instead of parsing the stream char by char, it uses a regular
        expression approach which minifies the whole script with one big
        substitution regex.

        .. _jsmin.c by Douglas Crockford:
           http://www.crockford.com/javascript/jsmin.c

        Parameters:
          script (str):
            Script to minify

          keep_bang_comments (bool):
            Keep comments starting with an exclamation mark? (``/*!...*/``)

        Returns:
          str: Minified script
        
%s
latin-1rA   )_as_strstripencode	bytearray)scriptkeep_bang_commentsis_bytesbangedsimples      r   r   z_make_jsmin.<locals>.jsminQ  sz    . #6??&:.:&&Fv
 

%'' 	  	+]]9--F1}}"6**r   F)_rjsmingetattrr   r   ImportError	NameErrorranger+   localsr)   r7   r*   _ftpartial)%python_onlyri   space_charsline_commentspace_commentspace_comment_nobangbang_commentstring1string2string3strings	charclass	nospecialregexspacenewliner>   not_id_literal	preregex1	preregex2
id_literalid_literal_openid_literal_closepost_regex_offdullspace_sub_simplerP   space_sub_bangedr[   r   rf   r-   r:   r=   rZ   rg   r9   s%                                 @@@@@@@r   _make_jsminr   K   s   $  	%	%NNN wt44CC}$ D  	 	 	D	    2K$L9ME9LHGooc7++GHG@Gooc7++GG!('''777;GAIII		999iiiEE (KK7E-G%
 %
 %
N/ / / / / // / / / / / / %_%566N)I+fhh6I-..J!k"9::O"{#BCC [!>??N$D{	'4 	;$  : ; B  8 {	)4 	;$  : ; B ;	     	 +*F": ": ": ": ": ":H [)+>??F[)+>??F      B Ls   1 
>>A AAc                 p   d}t           t          u r%t          | t                    st	          d          n~t          | t                    rd}|                     d          } nQt          | t                    rd}|                     d          } n$t          | t                     st	          d          || fS )z' Make sure the script is a text string FzUnexpected typeTr^   rA   )strbytes
isinstance
basestring	TypeErrordecoderb   )rc   re   s     r   r_   r_   w  s    H
e||&*-- 	/-...	/	FE	"	" +y))	FI	&	& +y))$$ +)***Vr   c                 4   |sd}d }n$d}t          j        d          j        d fd}t          |           \  }} t          j        ||d| z                                            } |r*|                     d          } |d	k    rt          |           } | S )
a  
    Minify javascript based on `jsmin.c by Douglas Crockford`_\.

    Instead of parsing the stream char by char, it uses a regular
    expression approach which minifies the whole script with one big
    substitution regex.

    .. _jsmin.c by Douglas Crockford:
       http://www.crockford.com/javascript/jsmin.c

    :Warning: This function is the digest of a _make_jsmin() call. It just
              utilizes the resulting regexes. It's here for fun and may
              vanish any time. Use the `jsmin` function instead.

    Parameters:
      script (str):
        Script to minify

      keep_bang_comments (bool):
        Keep comments starting with an exclamation mark? (``/*!...*/``)

    Returns:
      str: Minified script
    a@
  ([^\047"\140/\000-\040]+)|((?:(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^\047\\\r\n]*)*\047)|(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^"\\\r\n]*)*")|(?:\140[^\140\\]*(?:\\(?:[^\r\n]|\r?\n|\r)[^\140\\]*)*\140))[^\047"\140/\000-\040]*)|(?<=[)])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/[a-z]*))(?=(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*\.(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*[a-z])|(?<=[(,=:\[!&|?{};\r\n+*-])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/[a-z]*))((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040&)+,.:;=?\]|}-]))?|(?<=[\000-#%-,./:-@\[-^\140{-~-]return)(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:((?:(?://[^\r\n]*)?[\r\n]))(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/[a-z]*))((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040&)+,.:;=?\]|}-]))?|(?<=[^\000-!#%&(*,./:-@\[\\^{|~])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:((?:(?://[^\r\n]*)?[\r\n]))(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040"#%-\047)*,./:-@\\-^\140|-~])|(?<=[^\000-#%-,./:-@\[-^\140{-~-])((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=[^\000-#%-,./:-@\[-^\140{-~-])|(?<=\+)((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=\+)|(?<=-)((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=-)|(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+|(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+c                 8   |                                  }|d         p~|d         pv|d         pn|d         o
|d         dz   p[|d         pS|d         o!|d         rdpd	|d         |d
         rdpd	p)|d         odp|d         odp|d         odp|d         odpd	S )r@   r   r   rA   rC   rB   rD   rE   rF   r   rG   rH   rI   rL   rJ   rK   rM   rO   s     r   subberz jsmin_for_posers.<locals>.subber  s    \\^^Fq	 q	q	 1q	D 0 q		
  1I&$,",1II1I&$,",  #t "s # # r   aJ
  ([^\047"\140/\000-\040]+)|((?:(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^\047\\\r\n]*)*\047)|(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^"\\\r\n]*)*")|(?:\140[^\140\\]*(?:\\(?:[^\r\n]|\r?\n|\r)[^\140\\]*)*\140))[^\047"\140/\000-\040]*)|(?<=[)])((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*)((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/[a-z]*))(?=(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*\.(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*[a-z])|(?<=[(,=:\[!&|?{};\r\n+*-])((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*)((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/[a-z]*))((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040&)+,.:;=?\]|}-]))?|(?<=[\000-#%-,./:-@\[-^\140{-~-]return)((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:((?:(?://[^\r\n]*)?[\r\n]))(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*)((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/[a-z]*))((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040&)+,.:;=?\]|}-]))?|(?<=[^\000-!#%&(*,./:-@\[\\^{|~])((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+)(?=[^\000-\040"#%-\047)*,./:-@\\-^\140|-~])|(?<=[^\000-#%-,./:-@\[-^\140{-~-])((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+)(?=[^\000-#%-,./:-@\[-^\140{-~-])|(?<=\+)((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+)(?=\+)|(?<=-)((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+)(?=-)|((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+)|((?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+)z[\000-\011\013\014\016-\040]+|(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/)+|(?:(?://[^\r\n]*)?[\r\n])+|((?:/\*![^*]*\*+(?:[^/*][^*]*\*+)*/)+)c                 :    |                                  d         pdS rR   rM   r"   s    r   r$   z"jsmin_for_posers.<locals>.<lambda>  s    188::a=.B r   c                    |                                  }|d         pL|d         pC|d         o |d                   |d         p|d         o; |d                   |d          |d         pd          |d         rd	pdp|d
         oG |d                   |d         rd	pd|d
          |d         pd          |d         rd	pdp|d         o |d                   d	z   pm|d         o |d                   pdpQ|d         o |d                   pdp5|d         o |d                   pdp |d         p|d                   S )r@   r   r   rB   rA   rF   rC   rE   r   rD   rI   rG   rH   rJ   rK   rT   rL   rU   rV   rW   rX   rM   rY   s     r   r   z jsmin_for_posers.<locals>.subber  s   \\^^Fq	 7q	7q	 D+++1II7 q	 D+++1IIDb1111I&$,",	7 q	 D+++1I&$,",1IID!1r2222J'4-2-7& r
@VVBZ 8 84 ?'7( r
@VVBZ 8 8 ?C)7* r
@VVBZ 8 8 ?C+7, r
@VVBZ 8 8 ?C-7. VVBZ56":661r   r]   r^   rA   )r)   r7   r*   r_   r`   ra   rb   )rc   rd   rexr   re   r=   rZ   s        @@r   jsmin_for_posersr     s    2  U*, 	\	 	 	 	,*7 	\ {
 
 	 	
 /.	 	 	 	 	 	< vHfWS&(V"344::<<F 'y))q==v&&FMr   __main__c                     ddl } | j        dd         }d|v pd|v pd|v }d|v sd|v sd|v rt          d	          }nt          }| j                             || j                                        |
                     dS )z Main r   Nr   z-bz-bpz-pbz-pT)rq   )rd   )sysargvr   r   stdoutwritestdinread)_sysr   rd   xjsmins       r   mainr   C  s    y}!T\KUd]Ketm4<<5D==ETMM T222FFF&&JOO2D
 
 
 	 	 	 	 	r   rh   )__doc__
__author____license__r   __all__	functoolsro   rer)   r   r   r_   r   __name__r   r0   r   r   <module>r      s   > >~ 
+)        g g g gR	 	  $v v v vr z   	DFFFFF! r   